Skip to content

Commit 0ff0b1c

Browse files
[Backport release-0.8] Chore(ci): pin the actions by commit SHA and run on ubuntu-24.04 (#323)
* Chore(ci): pin the actions by commit SHA and run on ubuntu-24.04 Signed-off-by: Jerrin Francis <jerrinfrancis7@gmail.com> * Chore(ci): pin the BuildKit image by digest Signed-off-by: Jerrin Francis <jerrinfrancis7@gmail.com> * Chore(ci): keep the release image's provenance attestations Signed-off-by: Jerrin Francis <jerrinfrancis7@gmail.com> --------- Signed-off-by: Jerrin Francis <jerrinfrancis7@gmail.com>
1 parent ffb99ca commit 0ff0b1c

8 files changed

Lines changed: 63 additions & 63 deletions

File tree

‎.github/workflows/chart.yaml‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ on:
1313

1414
jobs:
1515
publish-images:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
1919
- name: Get the vars
2020
id: vars
2121
run: |
@@ -26,13 +26,13 @@ jobs:
2626
fi
2727
echo "GITVERSION=git-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
2828
- name: Login ghcr.io
29-
uses: docker/login-action@v3
29+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
3030
with:
3131
registry: ghcr.io
3232
username: ${{ github.actor }}
3333
password: ${{ secrets.GITHUB_TOKEN }}
3434
- name: Login Docker Hub
35-
uses: docker/login-action@v3
35+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
3636
with:
3737
username: ${{ secrets.DOCKER_USER }}
3838
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -48,12 +48,12 @@ jobs:
4848
echo "Image already exists but overwrite_version matches, continuing."
4949
fi
5050
fi
51-
- uses: docker/setup-qemu-action@v3
52-
- uses: docker/setup-buildx-action@v3
51+
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
52+
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
5353
with:
54-
driver-opts: image=moby/buildkit:master
54+
driver-opts: image=moby/buildkit:v0.34.2@sha256:c5f8862f52499773af85bc07695b2379ef08e8002352b0df2c4864c91d78dabe
5555

56-
- uses: docker/build-push-action@v3
56+
- uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
5757
name: Build & Pushing vela-workflow for Dockerhub
5858
with:
5959
context: .
@@ -74,22 +74,22 @@ jobs:
7474
publish-charts:
7575
env:
7676
HELM_CHART: charts/vela-workflow
77-
runs-on: ubuntu-22.04
77+
runs-on: ubuntu-24.04
7878
steps:
79-
- uses: actions/checkout@v4
79+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
8080
- name: Get the vars
8181
id: vars
8282
run: |
8383
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
8484
- name: Install Helm
85-
uses: azure/setup-helm@v4.3.0
85+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
8686
with:
8787
version: v3.4.0
8888
- name: Setup node
89-
uses: actions/setup-node@v4
89+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9090
with:
9191
node-version: '14'
92-
- uses: oprypin/find-latest-tag@v1
92+
- uses: oprypin/find-latest-tag@6957ac556fa6d349727ecabfcaaf9f8e5ee37124 # v1.1.3
9393
with:
9494
repository: kubevela/workflow
9595
releases-only: true
@@ -112,7 +112,7 @@ jobs:
112112
chart_smever=${chart_version#"v"}
113113
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
114114
115-
- uses: jnwng/github-app-installation-token-action@v2
115+
- uses: jnwng/github-app-installation-token-action@c54add4c02866dc41e106745ac6dcf5cdd6339e5 # v2
116116
id: get_app_token
117117
with:
118118
appId: 340472

‎.github/workflows/codeql-analysis.yaml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@ on:
1313
jobs:
1414
images:
1515
name: Image Scan
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2020

2121
- name: Build Vela Workflow image from Dockerfile
2222
run: |
2323
docker build --build-arg GOPROXY=https://proxy.golang.org -t docker.io/oamdev/vela-workflow:${{ github.sha }} -f ./Dockerfile .
2424
- name: Run Trivy vulnerability scanner for vela workflow
25-
uses: aquasecurity/trivy-action@master
25+
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
2626
with:
2727
image-ref: 'docker.io/oamdev/vela-workflow:${{ github.sha }}'
2828
format: 'sarif'
2929
output: 'trivy-results.sarif'
3030

3131
- name: Upload Trivy scan results to GitHub Security tab
32-
uses: github/codeql-action/upload-sarif@v1
32+
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
3333
if: always()
3434
with:
3535
sarif_file: 'trivy-results.sarif'
3636

3737
analyze:
3838
name: Analyze
39-
runs-on: ubuntu-latest
39+
runs-on: ubuntu-24.04
4040

4141
strategy:
4242
fail-fast: false
@@ -45,15 +45,15 @@ jobs:
4545

4646
steps:
4747
- name: Checkout repository
48-
uses: actions/checkout@v4
48+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
4949

5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v1
51+
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
5252
with:
5353
languages: ${{ matrix.language }}
5454

5555
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v1
56+
uses: github/codeql-action/autobuild@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
5757

5858
- name: Perform CodeQL Analysis
59-
uses: github/codeql-action/analyze@v1
59+
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3

‎.github/workflows/commit-lint.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010

1111
jobs:
1212
check:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
15-
- uses: thehanimo/pr-title-checker@v1.3.4
15+
- uses: thehanimo/pr-title-checker@7fbfe05602bdd86f926d3fb3bccb6f3aed43bc70 # v1.4.3
1616
with:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
pass_on_octokit_error: false

‎.github/workflows/e2e.yaml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ env:
2323
jobs:
2424

2525
detect-noop:
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
2727
outputs:
2828
noop: ${{ steps.noop.outputs.should_skip }}
2929
steps:
3030
- name: Detect No-op Changes
3131
id: noop
32-
uses: fkirc/skip-duplicate-actions@v5.3.0
32+
uses: fkirc/skip-duplicate-actions@b974a9395958c231af965b70070979a577efa578 # v5.3.2
3333
with:
3434
github_token: ${{ secrets.GITHUB_TOKEN }}
3535
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
3636
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
3737
concurrent_skipping: false
3838

3939
set-k8s-matrix:
40-
runs-on: ubuntu-22.04
40+
runs-on: ubuntu-24.04
4141
outputs:
4242
matrix: ${{ steps.set-k8s-matrix.outputs.matrix }}
4343
steps:
@@ -51,7 +51,7 @@ jobs:
5151
fi
5252
5353
e2e-tests:
54-
runs-on: ubuntu-22.04
54+
runs-on: ubuntu-24.04
5555
needs: [ detect-noop,set-k8s-matrix ]
5656
if: needs.detect-noop.outputs.noop != 'true'
5757
strategy:
@@ -64,10 +64,10 @@ jobs:
6464

6565
steps:
6666
- name: Check out code into the Go module directory
67-
uses: actions/checkout@v4
67+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
6868

6969
- name: Setup Go
70-
uses: actions/setup-go@v5
70+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
7171
with:
7272
go-version: ${{ env.GO_VERSION }}
7373

@@ -89,7 +89,7 @@ jobs:
8989
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
9090
9191
- name: Setup K3d
92-
uses: nolar/setup-k3d-k3s@v1.0.8
92+
uses: nolar/setup-k3d-k3s@62c9d1bd2bc843275c85d2e7dcd696edc1160eee # v1.1.0
9393
with:
9494
version: ${{ matrix.k8s-version }}
9595
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -110,7 +110,7 @@ jobs:
110110
run: make end-e2e
111111

112112
- name: Upload coverage report
113-
uses: codecov/codecov-action@v5
113+
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
114114
with:
115115
token: ${{ secrets.CODECOV_TOKEN }}
116116
files: /tmp/e2e-profile.out

‎.github/workflows/go.yaml‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,37 @@ env:
1919
jobs:
2020

2121
detect-noop:
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
outputs:
2424
noop: ${{ steps.noop.outputs.should_skip }}
2525
steps:
2626
- name: Detect No-op Changes
2727
id: noop
28-
uses: fkirc/skip-duplicate-actions@v5.3.0
28+
uses: fkirc/skip-duplicate-actions@b974a9395958c231af965b70070979a577efa578 # v5.3.2
2929
with:
3030
github_token: ${{ secrets.GITHUB_TOKEN }}
3131
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
3232
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
3333
concurrent_skipping: false
3434

3535
staticcheck:
36-
runs-on: ubuntu-22.04
36+
runs-on: ubuntu-24.04
3737
needs: detect-noop
3838
if: needs.detect-noop.outputs.noop != 'true'
3939

4040
steps:
4141
- name: Setup Go
42-
uses: actions/setup-go@v5
42+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
4343
with:
4444
go-version: ${{ env.GO_VERSION }}
4545

4646
- name: Checkout
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
4848
with:
4949
submodules: true
5050

5151
- name: Cache Go Dependencies
52-
uses: actions/cache@v4
52+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5353
with:
5454
path: .work/pkg
5555
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -62,23 +62,23 @@ jobs:
6262
run: staticcheck ./...
6363

6464
lint:
65-
runs-on: ubuntu-22.04
65+
runs-on: ubuntu-24.04
6666
needs: detect-noop
6767
if: needs.detect-noop.outputs.noop != 'true'
6868

6969
steps:
7070
- name: Setup Go
71-
uses: actions/setup-go@v5
71+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
7272
with:
7373
go-version: ${{ env.GO_VERSION }}
7474

7575
- name: Checkout
76-
uses: actions/checkout@v4
76+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
7777
with:
7878
submodules: true
7979

8080
- name: Cache Go Dependencies
81-
uses: actions/cache@v4
81+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
8282
with:
8383
path: .work/pkg
8484
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -89,6 +89,6 @@ jobs:
8989
# version, but we prefer this action because it leaves 'annotations' (i.e.
9090
# it comments on PRs to point out linter violations).
9191
- name: Lint
92-
uses: golangci/golangci-lint-action@v8
92+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
9393
with:
9494
version: ${{ env.GOLANGCI_VERSION }}

‎.github/workflows/post-submit.yaml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ env:
1212
jobs:
1313

1414
detect-noop:
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
outputs:
1717
noop: ${{ steps.noop.outputs.should_skip }}
1818
steps:
1919
- name: Detect No-op Changes
2020
id: noop
21-
uses: fkirc/skip-duplicate-actions@v5.3.0
21+
uses: fkirc/skip-duplicate-actions@b974a9395958c231af965b70070979a577efa578 # v5.3.2
2222
with:
2323
github_token: ${{ secrets.GITHUB_TOKEN }}
2424
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
2525
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
2626
concurrent_skipping: false
2727

2828
image-multi-arch:
29-
runs-on: ubuntu-22.04
29+
runs-on: ubuntu-24.04
3030
needs: detect-noop
3131
if: needs.detect-noop.outputs.noop != 'true'
3232
strategy:
@@ -35,12 +35,12 @@ jobs:
3535

3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
3939
with:
4040
submodules: true
4141

4242
- name: Setup Go
43-
uses: actions/setup-go@v4
43+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
4444
with:
4545
go-version: ${{ env.GO_VERSION }}
4646

@@ -56,12 +56,12 @@ jobs:
5656
docker push oamdev/vela-workflow:latest-${{ matrix.arch }}
5757
docker push oamdev/vela-workflow:latest-${{ matrix.arch }}
5858
image-manifest:
59-
runs-on: ubuntu-latest
59+
runs-on: ubuntu-24.04
6060
needs: [ image-multi-arch ]
6161
steps:
6262

6363
- name: Checkout
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
6565
with:
6666
submodules: true
6767

0 commit comments

Comments
 (0)