Skip to content

Commit 51cfec3

Browse files
authored
chore: reuse syft and cosign install actions across workflows (#16981)
This pull request adds new GitHub Actions for installing `cosign` and `syft`, and updates the CI, release, and security workflows. **New Actions:** - [`install-cosign`](.github/actions/install-cosign/action.yaml): Installs `cosign` with a configurable version. - [`install-syft`](.github/actions/install-syft/action.yaml): Installs `syft` with a configurable version. **Workflow Updates:** - CI, release, and security workflows now use `install-cosign` and `install-syft`.
1 parent e8d5f98 commit 51cfec3

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Install cosign"
2+
description: |
3+
Cosign Github Action.
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install cosign
8+
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
9+
with:
10+
cosign-release: "v2.4.3"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Install syft"
2+
description: |
3+
Downloads Syft to the Action tool cache and provides a reference.
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install syft
8+
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
9+
with:
10+
syft-version: "v1.20.0"

.github/workflows/ci.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,14 +1071,10 @@ jobs:
10711071
run: sudo apt-get install -y zstd
10721072

10731073
- name: Install cosign
1074-
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
1075-
with:
1076-
cosign-release: "v2.4.3"
1074+
uses: ./.github/actions/install-cosign
10771075

10781076
- name: Install syft
1079-
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
1080-
with:
1081-
syft-version: "v1.20.0"
1077+
uses: ./.github/actions/install-syft
10821078

10831079
- name: Setup Windows EV Signing Certificate
10841080
run: |

.github/workflows/release.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,10 @@ jobs:
251251
rm /tmp/rcodesign.tar.gz
252252
253253
- name: Install cosign
254-
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
255-
with:
256-
cosign-release: "v2.4.3"
254+
uses: ./.github/actions/install-cosign
257255

258256
- name: Install syft
259-
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
260-
with:
261-
syft-version: "v1.20.0"
257+
uses: ./.github/actions/install-syft
262258

263259
- name: Setup Apple Developer certificate and API key
264260
run: |

.github/workflows/security.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ jobs:
8585
- name: Setup sqlc
8686
uses: ./.github/actions/setup-sqlc
8787

88+
- name: Install cosign
89+
uses: ./.github/actions/install-cosign
90+
91+
- name: Install syft
92+
uses: ./.github/actions/install-syft
93+
8894
- name: Install yq
8995
run: go run github.com/mikefarah/yq/v4@v4.44.3
9096
- name: Install mockgen

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy