Skip to content

Commit 5c02082

Browse files
authored
Merge pull request #338 from codefresh-io/cr-24608-sync-upstream-3.5.7
feat: sync upstream `v3.5.7`
2 parents 018b802 + 94b6007 commit 5c02082

File tree

132 files changed

+3598
-1585
lines changed

Some content is hidden

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

132 files changed

+3598
-1585
lines changed

.github/workflows/changelog.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
tags:
66
- v*
77
- "!v0.0.0"
8+
89
permissions:
910
contents: read
1011

@@ -17,15 +18,15 @@ jobs:
1718
pull-requests: write # for peter-evans/create-pull-request to create a PR
1819
runs-on: ubuntu-latest
1920
steps:
20-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2122
with:
2223
ref: main
2324
fetch-depth: 0
2425
- run: git fetch --prune --prune-tags
2526
- run: git tag -l 'v*'
2627
# avoid invoking `make` to reduce the risk of a Makefile bug failing this workflow
2728
- run: ./hack/changelog.sh > CHANGELOG.md
28-
- uses: peter-evans/create-pull-request@v5
29+
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
2930
with:
3031
title: 'docs: updated CHANGELOG.md'
3132
commit-message: 'docs: updated CHANGELOG.md'

.github/workflows/ci-build.yaml

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
ui: ${{ steps.changed-files.outputs.ui_any_modified == 'true' }}
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3333
with:
3434
fetch-depth: 50 # assume PRs are less than 50 commits
3535
- name: Get relevant files changed per group
3636
id: changed-files
37-
uses: tj-actions/changed-files@v40
37+
uses: tj-actions/changed-files@cbda684547adc8c052d50711417fa61b428a9f88 # v41.1.2
3838
with:
3939
files_yaml: |
4040
common: &common
@@ -57,6 +57,7 @@ jobs:
5757
e2e-tests:
5858
- *tests
5959
# plus manifests and SDKs that are used in E2E tests
60+
- Dockerfile
6061
- manifests/**
6162
- sdks/**
6263
codegen:
@@ -73,6 +74,7 @@ jobs:
7374
- pkg/**
7475
- cmd/**
7576
- examples/** # examples are used within the fields lists
77+
- manifests/** # a few of these are generated and committed
7678
# generation scripts
7779
- hack/cli/**
7880
- hack/jsonschema/**
@@ -88,6 +90,8 @@ jobs:
8890
- *tests
8991
# plus lint config
9092
- .golangci.yml
93+
# all GH workflows / actions
94+
- .github/workflows/**
9195
# docs files below
9296
- docs/**
9397
# generated files are covered by codegen
@@ -111,8 +115,8 @@ jobs:
111115
runs-on: ubuntu-latest
112116
timeout-minutes: 10
113117
steps:
114-
- uses: actions/checkout@v4
115-
- uses: actions/setup-go@v4
118+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
119+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
116120
with:
117121
go-version: "1.21"
118122
cache: true
@@ -122,33 +126,40 @@ jobs:
122126
if: github.ref == 'refs/heads/main'
123127
run: bash <(curl -s https://codecov.io/bash)
124128

125-
argoexec-image:
126-
name: argoexec-image
129+
argo-images:
130+
name: argo-images
127131
# needs: [ lint ]
128132
runs-on: ubuntu-latest
129133
timeout-minutes: 10
134+
strategy:
135+
fail-fast: false
136+
matrix:
137+
include:
138+
- image: argoexec
139+
- image: argocli
130140
steps:
131-
- uses: actions/checkout@v4
132-
- uses: docker/setup-buildx-action@v3
141+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
142+
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
133143
- name: Build and export
134-
uses: docker/build-push-action@v5
144+
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
135145
with:
136146
context: .
137-
tags: quay.io/argoproj/argoexec:latest
138-
outputs: type=docker,dest=/tmp/argoexec_image.tar
139-
target: argoexec
147+
tags: quay.io/argoproj/${{matrix.image}}:latest
148+
outputs: type=docker,dest=/tmp/${{matrix.image}}_image.tar
149+
target: ${{matrix.image}}
140150
cache-from: type=gha
141151
cache-to: type=gha,mode=max
142152
- name: Upload
143-
uses: actions/upload-artifact@v4
153+
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
144154
with:
145-
name: argoexec
146-
path: /tmp/argoexec_image.tar
155+
name: ${{matrix.image}}_image.tar
156+
path: /tmp/${{matrix.image}}_image.tar
147157
if-no-files-found: error
148158

149159
e2e-tests:
150160
name: E2E Tests
151-
needs: [ argoexec-image ]
161+
needs: [ changed-files, argo-images ]
162+
if: ${{ needs.changed-files.outputs.e2e-tests == 'true' }}
152163
runs-on: ubuntu-latest
153164
timeout-minutes: 30
154165
env:
@@ -190,21 +201,21 @@ jobs:
190201
steps:
191202
- name: Install socat (needed by Kubernetes v1.25)
192203
run: sudo apt-get -y install socat
193-
- uses: actions/checkout@v4
194-
- uses: actions/setup-go@v4
204+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
205+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
195206
with:
196207
go-version: "1.21"
197208
cache: true
198209
- name: Install Java for the SDK
199210
if: ${{matrix.test == 'test-java-sdk'}}
200-
uses: actions/setup-java@v4
211+
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
201212
with:
202213
java-version: '8'
203214
distribution: adopt
204215
cache: maven
205216
- name: Install Python for the SDK
206217
if: ${{matrix.test == 'test-python-sdk'}}
207-
uses: actions/setup-python@v5
218+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
208219
with:
209220
python-version: '3.x'
210221
cache: pip
@@ -222,13 +233,16 @@ jobs:
222233
echo " user:" >> $KUBECONFIG
223234
echo " token: xxxxxx" >> $KUBECONFIG
224235
until kubectl cluster-info ; do sleep 10s ; done
225-
- name: Download argoexec image
226-
uses: actions/download-artifact@v4
236+
- name: Download images
237+
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
227238
with:
228-
name: argoexec
239+
pattern: '*_image.tar'
229240
path: /tmp
230-
- name: Load argoexec image
231-
run: docker load < /tmp/argoexec_image.tar
241+
- name: Load images
242+
run: |
243+
set -eux
244+
docker load < /tmp/argoexec_image.tar/argoexec_image.tar
245+
docker load < /tmp/argocli_image.tar/argocli_image.tar
232246
- name: Set-up /etc/hosts
233247
run: |
234248
echo '127.0.0.1 dex' | sudo tee -a /etc/hosts
@@ -295,8 +309,8 @@ jobs:
295309
env:
296310
GOPATH: /home/runner/go
297311
steps:
298-
- uses: actions/checkout@v4
299-
- uses: actions/setup-go@v4
312+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
313+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
300314
with:
301315
go-version: "1.21"
302316
cache: true
@@ -331,15 +345,18 @@ jobs:
331345
env:
332346
GOPATH: /home/runner/go
333347
steps:
334-
- uses: actions/checkout@v4
335-
- uses: actions/setup-go@v4
348+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
349+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
336350
with:
337351
go-version: "1.21"
338352
cache: true
339353
- run: make lint STATIC_FILES=false
340354
# if lint makes changes that are not in the PR, fail the build
341355
- name: Check if lint made changes not present in the PR
342356
run: git diff --exit-code
357+
# lint GH Actions
358+
- name: Ensure GH Actions are pinned to SHAs
359+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ba37328d4ea95eaf8b3bd6c6cef308f709a5f2ec # v3.0.3
343360

344361
ui:
345362
name: UI
@@ -348,8 +365,8 @@ jobs:
348365
env:
349366
NODE_OPTIONS: --max-old-space-size=4096
350367
steps:
351-
- uses: actions/checkout@v4
352-
- uses: actions/setup-node@v4
368+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
369+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
353370
with:
354371
node-version: "20" # change in all GH Workflows
355372
cache: yarn

.github/workflows/default-branch-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: fail if base branch is not default branch
1414
if: ${{ github.event.pull_request.base.ref != github.event.repository.default_branch }}
15-
uses: actions/github-script@v3
15+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
1616
with:
1717
script: |
1818
core.setFailed("Base branch of the PR - ${{ github.event.pull_request.base.ref }} is not a default branch. Please reopen your PR to ${{ github.event.repository.default_branch }}")

.github/workflows/dependabot-reviewer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
review:
1010
if: ${{ github.actor == 'dependabot[bot]' && github.repository == 'argoproj/argo-workflows'}}
1111
permissions:
12-
pull-requests: write
13-
contents: write
12+
pull-requests: write # for approving a PR
13+
contents: write # for enabling auto-merge on a PR
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Dependabot metadata
1717
id: metadata
18-
uses: dependabot/[email protected]
18+
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0
1919
with:
2020
github-token: "${{ secrets.GITHUB_TOKEN }}"
2121
- name: Approve PR

.github/workflows/docs.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,40 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
permissions:
16-
contents: write
16+
contents: read
1717

1818
jobs:
1919
docs:
2020
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write # for publishing the docs to GH Pages
2123
steps:
22-
- uses: actions/checkout@v4
23-
- uses: actions/setup-python@v5
24+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
2426
with:
2527
python-version: 3.9
26-
- uses: actions/setup-go@v4
28+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
2729
with:
2830
go-version: '1.21'
29-
- uses: actions/setup-node@v4
31+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
3032
with:
3133
node-version: "19"
3234
# Use the same make target both locally and on CI to make it easier to debug failures.
3335
- name: Build & Lint docs
3436
run: make docs
35-
# If markdownlint fixes issues, files will be changed. If so, fail the build.
36-
- name: Check if markdownlint --fix made changes
37+
# If linters auto-fix issues, files will be changed. If so, fail the build.
38+
- name: Check if linters made changes
3739
run: git diff --exit-code
3840
# Upload the site so reviewers see it.
3941
- name: Upload Docs Site
40-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
4143
with:
4244
name: docs
4345
path: site
4446
if-no-files-found: error
4547
- name: Publish to GH Pages (when on main)
4648
if: github.repository == 'argoproj/argo-workflows' && github.ref == 'refs/heads/main'
47-
uses: peaceiris/actions-gh-pages@v3
49+
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
4850
with:
4951
github_token: ${{ secrets.GITHUB_TOKEN }}
5052
publish_branch: gh-pages

.github/workflows/pr.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ on:
88
- reopened
99
- synchronize
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
title-check:
1316
runs-on: ubuntu-latest
1417
steps:
1518
- name: Check PR Title's semantic conformance
16-
uses: amannn/action-semantic-pull-request@v5
19+
uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0
1720
env:
1821
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)