Skip to content

Commit e2fa376

Browse files
chore: updates github actions to work in sync branch (#415)
* updates github actions to work in sync branch * bumps mockery to the latest 2.x version to avoid codegen errors
1 parent 3b308d6 commit e2fa376

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+220
-210
lines changed

.github/workflows/ci-build.yaml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ name: Integration tests
22
on:
33
push:
44
branches:
5-
- 'master'
6-
- 'release-*'
7-
- '!release-1.4'
8-
- '!release-1.5'
5+
- 'sync-*'
6+
# - 'master'
7+
# - 'release-*'
8+
# - '!release-1.4'
9+
# - '!release-1.5'
910
pull_request:
1011
branches:
11-
- 'master'
12-
- 'release-*'
12+
- 'sync-*'
13+
# - 'master'
14+
# - 'release-*'
1315

1416
env:
1517
# Golang version to use across CI steps
1618
# renovate: datasource=golang-version packageName=golang
17-
GOLANG_VERSION: '1.23.3'
19+
GOLANG_VERSION: '1.24.1'
1820

1921
concurrency:
2022
group: ${{ github.workflow }}-${{ github.ref }}
@@ -39,7 +41,7 @@ jobs:
3941
files_yaml: |
4042
backend:
4143
- '!ui/**'
42-
- '!**.md'
44+
- '!**.md'
4345
- '!**/*.md'
4446
- '!docs/**'
4547
frontend:
@@ -94,8 +96,8 @@ jobs:
9496

9597
lint-go:
9698
permissions:
97-
contents: read # for actions/checkout to fetch code
98-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
99+
contents: read # for actions/checkout to fetch code
100+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
99101
name: Lint Go code
100102
if: ${{ needs.changes.outputs.backend == 'true' }}
101103
runs-on: ubuntu-22.04
@@ -112,7 +114,7 @@ jobs:
112114
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
113115
with:
114116
# renovate: datasource=go packageName=github.com/golangci/golangci-lint versioning=regex:^v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)?$
115-
version: v1.62.2
117+
version: v1.64.7
116118
args: --verbose
117119

118120
test-go:
@@ -383,7 +385,7 @@ jobs:
383385
env:
384386
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
385387
- name: Upload test results to Codecov
386-
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'argoproj/argo-cd'
388+
if: startsWith(github.ref, 'refs/heads/sync-') && github.event_name == 'push' && github.repository == 'codefresh-io/argo-cd'
387389
uses: codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 # v1.0.1
388390
with:
389391
file: test-results/junit.xml
@@ -394,38 +396,39 @@ jobs:
394396
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
395397
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
396398
uses: SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
397-
if: env.sonar_secret != ''
399+
if: false && env.sonar_secret != ''
398400
test-e2e:
399401
name: Run end-to-end tests
400402
if: ${{ needs.changes.outputs.backend == 'true' }}
401403
runs-on: ubuntu-22.04
402404
strategy:
403405
fail-fast: false
404406
matrix:
407+
# latest: true means that this version mush upload the coverage report to codecov.io
408+
# We designate the latest version because we only collect code coverage for that version.
405409
k3s:
406-
- version: v1.31.0
407-
# We designate the latest version because we only collect code coverage for that version.
410+
- version: v1.32.1
408411
latest: true
412+
- version: v1.31.0
413+
latest: false
409414
- version: v1.30.4
410415
latest: false
411416
- version: v1.29.8
412417
latest: false
413-
- version: v1.28.13
414-
latest: false
415418
needs:
416419
- build-go
417420
- changes
418421
env:
419422
GOPATH: /home/runner/go
420-
ARGOCD_FAKE_IN_CLUSTER: "true"
421-
ARGOCD_SSH_DATA_PATH: "/tmp/argo-e2e/app/config/ssh"
422-
ARGOCD_TLS_DATA_PATH: "/tmp/argo-e2e/app/config/tls"
423-
ARGOCD_E2E_SSH_KNOWN_HOSTS: "../fixture/certs/ssh_known_hosts"
424-
ARGOCD_E2E_K3S: "true"
425-
ARGOCD_IN_CI: "true"
426-
ARGOCD_E2E_APISERVER_PORT: "8088"
427-
ARGOCD_APPLICATION_NAMESPACES: "argocd-e2e-external,argocd-e2e-external-2"
428-
ARGOCD_SERVER: "127.0.0.1:8088"
423+
ARGOCD_FAKE_IN_CLUSTER: 'true'
424+
ARGOCD_SSH_DATA_PATH: '/tmp/argo-e2e/app/config/ssh'
425+
ARGOCD_TLS_DATA_PATH: '/tmp/argo-e2e/app/config/tls'
426+
ARGOCD_E2E_SSH_KNOWN_HOSTS: '../fixture/certs/ssh_known_hosts'
427+
ARGOCD_E2E_K3S: 'true'
428+
ARGOCD_IN_CI: 'true'
429+
ARGOCD_E2E_APISERVER_PORT: '8088'
430+
ARGOCD_APPLICATION_NAMESPACES: 'argocd-e2e-external,argocd-e2e-external-2'
431+
ARGOCD_SERVER: '127.0.0.1:8088'
429432
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
430433
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
431434
steps:
@@ -549,4 +552,4 @@ jobs:
549552
exit 0
550553
else
551554
exit 1
552-
fi
555+
fi

.github/workflows/codeql.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,37 @@ jobs:
2828
# CodeQL runs on ubuntu-latest and windows-latest
2929
runs-on: ubuntu-22.04
3030
steps:
31-
- name: Checkout repository
32-
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
31+
- name: Checkout repository
32+
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
3333

34-
# Use correct go version. https://github.com/github/codeql-action/issues/1842#issuecomment-1704398087
35-
- name: Setup Golang
36-
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
37-
with:
38-
go-version-file: go.mod
34+
# Use correct go version. https://github.com/github/codeql-action/issues/1842#issuecomment-1704398087
35+
- name: Setup Golang
36+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
37+
with:
38+
go-version-file: go.mod
3939

40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
43-
# Override language selection by uncommenting this and choosing your languages
44-
# with:
45-
# languages: go, javascript, csharp, python, cpp, java
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
43+
# Override language selection by uncommenting this and choosing your languages
44+
# with:
45+
# languages: go, javascript, csharp, python, cpp, java
4646

47-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48-
# If this step fails, then you should remove it and run the build manually (see below)
49-
- name: Autobuild
50-
uses: github/codeql-action/autobuild@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
47+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48+
# If this step fails, then you should remove it and run the build manually (see below)
49+
- name: Autobuild
50+
uses: github/codeql-action/autobuild@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
5151

52-
# ℹ️ Command-line programs to run using the OS shell.
53-
# 📚 https://git.io/JvXDl
52+
# ℹ️ Command-line programs to run using the OS shell.
53+
# 📚 https://git.io/JvXDl
5454

55-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
56-
# and modify them (or add more) to build your code if your project
57-
# uses a compiled language
55+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
56+
# and modify them (or add more) to build your code if your project
57+
# uses a compiled language
5858

59-
#- run: |
60-
# make bootstrap
61-
# make release
59+
#- run: |
60+
# make bootstrap
61+
# make release
6262

63-
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
63+
- name: Perform CodeQL Analysis
64+
uses: github/codeql-action/analyze@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2

.github/workflows/image-reuse.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
7676

7777
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
78-
- uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
78+
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
7979

8080
- name: Setup tags for container image as a CSV type
8181
run: |
@@ -126,10 +126,10 @@ jobs:
126126

127127
- name: Set up build args for container image
128128
run: |
129-
echo "GIT_TAG=$(if [ -z "`git status --porcelain`" ]; then git describe --exact-match --tags HEAD 2>/dev/null; fi)" >> $GITHUB_ENV
130-
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
131-
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
132-
echo "GIT_TREE_STATE=$(if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)" >> $GITHUB_ENV
129+
echo "GIT_TAG=$(if [ -z "`git status --porcelain`" ]; then git describe --exact-match --tags HEAD 2>/dev/null; fi)" >> $GITHUB_ENV
130+
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
131+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
132+
echo "GIT_TREE_STATE=$(if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)" >> $GITHUB_ENV
133133
134134
- name: Free Disk Space (Ubuntu)
135135
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
@@ -166,4 +166,4 @@ jobs:
166166
-y \
167167
"$signing_tag"@${{ steps.image.outputs.digest }}
168168
done
169-
if: ${{ inputs.push }}
169+
if: ${{ inputs.push }}

.github/workflows/image.yaml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Image
33
on:
44
push:
55
branches:
6-
- master
6+
- sync-*
77
pull_request:
88
branches:
9-
- master
10-
types: [ labeled, unlabeled, opened, synchronize, reopened ]
9+
- sync-*
10+
types: [labeled, unlabeled, opened, synchronize, reopened]
1111

1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
@@ -19,17 +19,25 @@ jobs:
1919
set-vars:
2020
permissions:
2121
contents: read
22-
if: github.repository == 'argoproj/argo-cd'
22+
if: github.repository == 'codefresh-io/argo-cd'
2323
runs-on: ubuntu-22.04
2424
outputs:
25-
image-tag: ${{ steps.image.outputs.tag}}
25+
image-tag: ${{ steps.image-pr.outputs.tag || steps.image-push.outputs.tag }}
2626
platforms: ${{ steps.platforms.outputs.platforms }}
2727
steps:
2828
- uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
2929

30-
- name: Set image tag for ghcr
31-
run: echo "tag=$(cat ./VERSION)-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
32-
id: image
30+
- name: Set image tag (push to feature branch)
31+
if: ${{ github.repository == 'codefresh-io/argo-cd' && github.event_name == 'pull_request' }}
32+
run: |
33+
CLEAN_REF=$(echo "${{ github.head_ref }}" | sed 's|^refs/[^/]*||; s|/|_|g')
34+
echo "tag=v$(cat ./VERSION)-${CLEAN_REF}-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
35+
id: image-pr
36+
37+
- name: Set image tag (push to sync-* branch)
38+
if: ${{ github.repository == 'codefresh-io/argo-cd' && github.event_name == 'push' }}
39+
run: echo "tag=v$(cat ./VERSION)-$(date +%Y-%m-%d)-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
40+
id: image-push
3341

3442
- name: Determine image platforms to use
3543
id: platforms
@@ -46,31 +54,31 @@ jobs:
4654
needs: [set-vars]
4755
permissions:
4856
contents: read
49-
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
57+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
5058
id-token: write # for creating OIDC tokens for signing.
51-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name != 'push' }}
59+
if: ${{ false }}
5260
uses: ./.github/workflows/image-reuse.yaml
5361
with:
5462
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
5563
# renovate: datasource=golang-version packageName=golang
56-
go-version: 1.23.3
64+
go-version: 1.24.1
5765
platforms: ${{ needs.set-vars.outputs.platforms }}
5866
push: false
5967

6068
build-and-publish:
6169
needs: [set-vars]
6270
permissions:
6371
contents: read
64-
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
72+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
6573
id-token: write # for creating OIDC tokens for signing.
66-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
74+
if: ${{ github.repository == 'codefresh-io/argo-cd' }}
6775
uses: ./.github/workflows/image-reuse.yaml
6876
with:
69-
quay_image_name: quay.io/argoproj/argocd:latest
70-
ghcr_image_name: ghcr.io/argoproj/argo-cd/argocd:${{ needs.set-vars.outputs.image-tag }}
77+
quay_image_name: ${{ github.event_name == 'pull_request' && 'quay.io/codefresh/dev/argocd' || 'quay.io/codefresh/argocd' }}:${{ needs.set-vars.outputs.image-tag }}
78+
# ghcr_image_name: ghcr.io/codefresh-io/argo-cd/argocd:${{ needs.set-vars.outputs.image-tag }}
7179
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
7280
# renovate: datasource=golang-version packageName=golang
73-
go-version: 1.23.3
81+
go-version: 1.24.1
7482
platforms: ${{ needs.set-vars.outputs.platforms }}
7583
push: true
7684
secrets:
@@ -86,7 +94,7 @@ jobs:
8694
actions: read # for detecting the Github Actions environment.
8795
id-token: write # for creating OIDC tokens for signing.
8896
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
89-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
97+
if: ${{ false }}
9098
# 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
9199
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0.0
92100
with:
@@ -101,9 +109,9 @@ jobs:
101109
- build-and-publish
102110
- set-vars
103111
permissions:
104-
contents: write # for git to push upgrade commit if not already deployed
105-
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
106-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
112+
contents: write # for git to push upgrade commit if not already deployed
113+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
114+
if: ${{ false }}
107115
runs-on: ubuntu-22.04
108116
steps:
109117
- uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
@@ -115,5 +123,4 @@ jobs:
115123
git config --global user.email 'ci@argoproj.com'
116124
git config --global user.name 'CI'
117125
git diff --exit-code && echo 'Already deployed' || (git commit -am 'Upgrade argocd to ${{ needs.set-vars.outputs.image-tag }}' && git push)
118-
working-directory: argoproj-deployments/argocd
119-
126+
working-directory: argoproj-deployments/argocd

.github/workflows/pr-title-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ permissions: {}
1212
# workflow being trigger a number of times. This limits it
1313
# to one run per PR.
1414
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
15+
group: ${{ github.workflow }}-${{ github.head_ref }}
16+
cancel-in-progress: true
1717

1818
jobs:
1919
validate:
@@ -26,4 +26,4 @@ jobs:
2626
- uses: thehanimo/pr-title-checker@7fbfe05602bdd86f926d3fb3bccb6f3aed43bc70 # v1.4.3
2727
with:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
configuration_path: ".github/pr-title-checker-config.json"
29+
configuration_path: ".github/pr-title-checker-config.json"

applicationset/generators/mocks/Generator.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applicationset/services/mocks/Repos.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applicationset/services/scm_provider/azure_devops/git/mocks/Client.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)