Skip to content

Commit a997aa2

Browse files
authored
Fix zizmor warnings in github actions (#614)
1 parent 8f5e623 commit a997aa2

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

.github/workflows/build-docker-images.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ on:
1818
- 'runners/**'
1919
- 'cryptography-linux/**'
2020

21-
permissions:
22-
contents: read
23-
packages: write
24-
2521
jobs:
26-
# Build containers for x86
2722
build:
2823
runs-on: ${{ matrix.IMAGE.RUNNER }}
24+
permissions:
25+
contents: read
26+
packages: write
27+
2928
strategy:
3029
fail-fast: false
3130
matrix:
@@ -63,6 +62,8 @@ jobs:
6362
name: "${{ matrix.IMAGE.TAG_NAME }}"
6463
steps:
6564
- uses: actions/[email protected]
65+
with:
66+
persist-credentials: false
6667
- run: |
6768
source ./staticnode/node-version.sh
6869
arch=$(echo "${{ runner.arch }}" | tr '[:upper:]' '[:lower:]')
@@ -74,7 +75,7 @@ jobs:
7475
run: docker pull ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }} || true
7576
if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
7677
- name: Build image
77-
run: docker build --pull --cache-from ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }} -t ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }} ${{ matrix.IMAGE.DOCKERFILE_PATH }} ${{ matrix.IMAGE.BUILD_ARGS }} --build-arg NODE_ARCH_RELEASE=${{ env.NODE_ARCH_RELEASE }}
78+
run: docker build --pull --cache-from ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }} -t ghcr.io/pyca/${{ matrix.IMAGE.TAG_NAME }} ${{ matrix.IMAGE.DOCKERFILE_PATH }} ${{ matrix.IMAGE.BUILD_ARGS }} --build-arg "NODE_ARCH_RELEASE=${NODE_ARCH_RELEASE}"
7879
- name: Login to docker
7980
run: 'docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" ghcr.io'
8081
env:

.github/workflows/build-macos-openssl.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
name: "Build OpenSSL for macOS (${{ matrix.ARCH.NAME }})"
3434
steps:
3535
- uses: actions/[email protected]
36+
with:
37+
persist-credentials: false
3638
- name: Download OpenSSL
3739
run: |
3840
source ./cryptography-linux/openssl-version.sh

.github/workflows/build-static-node.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
name: Build Static Node.js Container
2-
permissions:
3-
contents: read
4-
packages: write
52

63
on:
74
pull_request:
@@ -19,6 +16,9 @@ jobs:
1916
build:
2017
name: Build node.js
2118
runs-on: ${{ matrix.IMAGE.RUNNER }}
19+
permissions:
20+
contents: read
21+
packages: write
2222
strategy:
2323
fail-fast: false
2424
matrix:
@@ -27,6 +27,8 @@ jobs:
2727
- {RUNNER: [self-hosted, Linux, ARM64], MANYLINUX_ARCH: "aarch64"}
2828
steps:
2929
- uses: actions/[email protected]
30+
with:
31+
persist-credentials: false
3032
- name: Set Node.js version
3133
run: |
3234
source ./staticnode/node-version.sh
@@ -50,5 +52,5 @@ jobs:
5052
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
5153
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
5254
- name: Push image
53-
run: docker push ghcr.io/pyca/static-nodejs-${{ env.NODE_ARCH }}:${{ env.NODE_VERSION }}
55+
run: docker push "ghcr.io/pyca/static-nodejs-${NODE_ARCH}:${NODE_VERSION}"
5456
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'

.github/workflows/build-windows-openssl.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
name: "Build OpenSSL for ${{ matrix.ARCH }} on MSVC 2022"
2828
steps:
2929
- uses: actions/[email protected]
30+
with:
31+
persist-credentials: false
3032
- run: choco install -y nasm winrar
3133
- name: Export OpenSSL version
3234
run: |

.github/workflows/terraform.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/[email protected]
20+
with:
21+
persist-credentials: false
2022
- run: terraform -chdir=terraform/ fmt -check
2123
- run: terraform -chdir=terraform/ init -backend=false
2224
# Need to have a values.yaml for validate to pass.

0 commit comments

Comments
 (0)