From adaf660825d257de06ae05bc9b9c5602e14492a3 Mon Sep 17 00:00:00 2001 From: Florian Hines Date: Mon, 9 Nov 2026 19:17:43 -0600 Subject: [PATCH 1/2] ci: require approval before production Worker deploy --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f12e64..f573af5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,7 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: test runs-on: ubuntu-latest + environment: production concurrency: group: deploy-production cancel-in-progress: false From 065629a759f638b670734ff56926e7e6ffbbc14c Mon Sep 17 00:00:00 2001 From: Florian Hines Date: Mon, 9 Nov 2026 19:19:40 -0600 Subject: [PATCH 2/2] ci: narrow credentials exposed during Worker deploy --- .github/workflows/test.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f573af5..088e03e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 24 cache: npm @@ -33,23 +33,25 @@ jobs: needs: test runs-on: ubuntu-latest environment: production + permissions: + contents: read concurrency: group: deploy-production cancel-in-progress: false steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 24 cache: npm - name: Install dependencies - run: npm ci + run: npm ci --ignore-scripts - name: Deploy Worker - run: npm run deploy + run: ./node_modules/.bin/wrangler deploy --minify env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}