Skip to content

Commit ada06f9

Browse files
authored
Darren/fix/revert goreleaser (#1377)
* Revert "fix: master CI (#1368)" This reverts commit 0fb962a. * Revert "feat: use goreleaser for docker images and binaries (#1344)" This reverts commit 781a6c5.
1 parent e0043cc commit ada06f9

11 files changed

Lines changed: 527 additions & 595 deletions

.github/actions/setup-release/action.yaml

Lines changed: 0 additions & 171 deletions
This file was deleted.

.github/workflows/goreleaser.yaml

Lines changed: 0 additions & 166 deletions
This file was deleted.

.github/workflows/on-master-commit.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,50 @@ jobs:
4444
with:
4545
thor_version: ${{ github.sha }}
4646

47+
generate-tags:
48+
name: Generate Docker Tags
49+
runs-on: ubuntu-latest
50+
outputs:
51+
tag_date: ${{ steps.tag_date.outputs.tag_date }}
52+
short_sha: ${{ steps.short_sha.outputs.short_sha }}
53+
clean_ref_name: ${{ steps.clean_ref_name.outputs.clean_ref_name }}
54+
steps:
55+
- name: Generate Tag Date
56+
id: tag_date
57+
run: echo "tag_date=$(date +'%Y%m%d')" >> "$GITHUB_OUTPUT"
58+
- name: Generate Short SHA
59+
id: short_sha
60+
run: echo "short_sha=$(echo $GITHUB_SHA | cut -c1-7)" >> "$GITHUB_OUTPUT"
61+
- name: Clean Ref Name
62+
id: clean_ref_name
63+
# replace '/' with '-' in the case of release branches
64+
run: echo "clean_ref_name=$(echo $GITHUB_REF_NAME | sed 's/\//-/g')" >> "$GITHUB_OUTPUT"
65+
4766
publish-docker-image:
4867
name: Publish Docker Image
49-
uses: ./.github/workflows/goreleaser.yaml
68+
uses: ./.github/workflows/publish-docker-images.yaml
5069
secrets: inherit
5170
needs:
5271
- run-unit-tests
5372
- run-e2e-tests
73+
- generate-tags
5474
- lint
5575
- license-check
5676
permissions:
5777
contents: read
5878
packages: write
59-
attestations: read
60-
79+
with:
80+
images: |
81+
ghcr.io/${{ github.repository }}
82+
tags: |
83+
type=raw,value=${{ needs.generate-tags.outputs.clean_ref_name }}-${{ needs.generate-tags.outputs.tag_date }}-${{ needs.generate-tags.outputs.short_sha }}
84+
type=raw,value=${{ needs.generate-tags.outputs.clean_ref_name }}-latest
85+
trigger_internal_ci: true
6186
notify-slack:
6287
name: Notify Slack
6388
needs:
6489
- publish-docker-image
90+
- generate-tags
6591
- license-check
6692
- lint
6793
- module-check

0 commit comments

Comments
 (0)