1- name : Create ArgoCD release
1+ name : Publish ArgoCD Release
22on :
33 push :
44 tags :
5- - " release-v**"
6- - " !release-v1.5*"
7- - " !release-v1.4*"
8- - " !release-v1.3*"
9- - " !release-v1.2*"
10- - " !release-v1.1*"
11- - " !release-v1.0*"
12- - " !release-v0*"
5+ - ' v*'
6+ - ' !v2.4*'
7+ - ' !v2.5*'
8+ - ' !v2.6*'
9+
10+ permissions : {}
1311
1412env :
1513 # renovate: datasource=golang-version packageName=golang
4240 packages : write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
4341 # Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
4442 if : github.repository == 'argoproj/argo-cd'
45- uses : slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v1.9 .0
43+ uses : slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0 .0
4644 with :
4745 image : quay.io/argoproj/argocd
4846 digest : ${{ needs.argocd-image.outputs.image-digest }}
5856 contents : write # used for uploading assets
5957 if : github.repository == 'argoproj/argo-cd'
6058 runs-on : ubuntu-22.04
61- env :
62- ARTIFACT_NAME : release-notes
6359 outputs :
64- TARGET_VERSION : ${{ steps.setup-vars.outputs.TARGET_VERSION }}
65- TARGET_BRANCH : ${{ steps.setup-vars.outputs.TARGET_BRANCH }}
66- PRE_RELEASE : ${{ steps.setup-vars.outputs.PRE_RELEASE }}
67- RELEASE_TAG : ${{ steps.setup-vars.outputs.RELEASE_TAG }}
68- RELEASE_NOTES : ${{ steps.release-notes.outputs.RELEASE_NOTES }}
60+ hashes : ${{ steps.hash.outputs.hashes }}
6961
7062 steps :
7163 - name : Checkout code
9385 echo "KUBECTL_VERSION=$(go list -m k8s.io/client-go | head -n 1 | rev | cut -d' ' -f1 | rev)" >> $GITHUB_ENV
9486 echo "GIT_TREE_STATE=$(if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)" >> $GITHUB_ENV
9587
88+ - name : Free Disk Space (Ubuntu)
89+ uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
90+ with :
91+ large-packages : false
92+ docker-images : false
93+ swap-storage : false
94+ tool-cache : false
95+
9696 - name : Run GoReleaser
9797 uses : goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
9898 id : run-goreleaser
@@ -126,7 +126,7 @@ jobs:
126126 contents : write # Needed for release uploads
127127 if : github.repository == 'argoproj/argo-cd'
128128 # Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
129- uses : slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9 .0
129+ uses : slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0 .0
130130 with :
131131 base64-subjects : " ${{ needs.goreleaser.outputs.hashes }}"
132132 provenance-name : " argocd-cli.intoto.jsonl"
@@ -135,43 +135,21 @@ jobs:
135135 generate-sbom :
136136 name : Create SBOM and generate hash
137137 needs :
138- - prepare-release
139- - binaries
140- - container-image
138+ - argocd-image
139+ - goreleaser
140+ permissions :
141+ contents : write # Needed for release uploads
142+ outputs :
143+ hashes : ${{ steps.sbom-hash.outputs.hashes}}
144+ if : github.repository == 'argoproj/argo-cd'
145+ runs-on : ubuntu-22.04
141146 steps :
142147 - name : Checkout code
143148 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
144149 with :
145150 fetch-depth : 0
146151 token : ${{ secrets.GITHUB_TOKEN }}
147152
148- - name : Setup Git author information
149- run : |
150- set -ue
151- git config --global user.email "${GIT_EMAIL}"
152- git config --global user.name "${GIT_USERNAME}"
153- - name : Checkout corresponding release branch
154- run : |
155- set -ue
156- echo "Switching to release branch '${TARGET_BRANCH}'"
157- if ! git checkout ${TARGET_BRANCH}; then
158- echo "::error::Checking out release branch '${TARGET_BRANCH}' for target version '${TARGET_VERSION}' (tagged '${RELEASE_TAG}') failed. Does it exist in repo?"
159- exit 1
160- fi
161-
162- - name : Create the release tag
163- run : |
164- set -ue
165- echo "Creating release ${RELEASE_TAG}"
166- git tag ${RELEASE_TAG}
167-
168- - name : Push changes to release branch
169- run : |
170- set -ue
171- # Codefresh change
172- # git push origin ${TARGET_BRANCH}
173- git push origin ${RELEASE_TAG}
174-
175153 - name : Setup Golang
176154 uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
177155 with :
@@ -188,7 +166,7 @@ jobs:
188166 # managers (gomod, yarn, npm).
189167 PROJECT_FOLDERS : " .,./ui"
190168 # full qualified name of the docker image to be inspected
191- DOCKER_IMAGE : ${{env.IMAGE_NAMESPACE}}/ argocd:v ${{env.TARGET_VERSION }}
169+ DOCKER_IMAGE : quay.io/argoproj/ argocd:${{ github.ref_name }}
192170 run : |
193171 yarn install --cwd ./ui
194172 go install github.com/spdx/spdx-sbom-generator/cmd/generator@$SPDX_GEN_VERSION
@@ -221,10 +199,7 @@ jobs:
221199 env :
222200 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
223201 with :
224- token : ${{ secrets.GITHUB_TOKEN }}
225- name : ${{ env.RELEASE_TAG }}
226202 files : |
227- argocd-*
228203 /tmp/sbom.tar.gz
229204
230205 sbom-provenance :
@@ -253,13 +228,12 @@ jobs:
253228 runs-on : ubuntu-22.04
254229 steps :
255230 - name : Checkout code
256- uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
231+ uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
257232 with :
258- token : ${{env.HOMEBREW_TOKEN}}
259- formula : argocd
260- if : ${{ env.HOMEBREW_TOKEN != '' && env.UPDATE_HOMEBREW == 'true' && env.PRE_RELEASE != 'true' }}
233+ fetch-depth : 0
234+ token : ${{ secrets.GITHUB_TOKEN }}
261235
262- - name : Delete original request tag from repository
236+ - name : Setup Git author information
263237 run : |
264238 set -ue
265239 git config --global user.email 'ci@argoproj.com'
@@ -315,7 +289,7 @@ jobs:
315289 # Replace the 'project-release: vX.X.X-rcX' line in SECURITY-INSIGHTS.yml
316290 sed -i "s/project-release: v.*$/project-release: v${{ env.NEW_VERSION }}/" SECURITY-INSIGHTS.yml
317291 # Update the 'commit-hash: XXXXXXX' line in SECURITY-INSIGHTS.yml
318- sed -i "s/commit-hash: .*/commit-hash: ${{ env.NEW_VERSION }}/" SECURITY-INSIGHTS.yml
292+ sed -i "s/commit-hash: .*/commit-hash: ${{ env.COMMIT_HASH }}/" SECURITY-INSIGHTS.yml
319293 if : ${{ env.UPDATE_VERSION == 'true' }}
320294
321295 - name : Create PR to update VERSION on master branch
0 commit comments