Skip to content

Commit 10ede78

Browse files
authored
Merge pull request #1395 from OWASP/improve-pipelines
Make the secret available to the reusable workflow from the caller
2 parents a007af2 + 4fccd06 commit 10ede78

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/build-website-staging.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
branches: [master]
66
paths:
77
- 'cornucopia.owasp.org/**'
8-
- '.github/workflows/deploy-staging.yml'
8+
- '.github/workflows/deploy-website-staging.yml'
9+
- '.github/workflows/build-website-staging.yml'
910
permissions:
1011
contents: read
1112
jobs:
@@ -53,3 +54,4 @@
5354
call-deploy-staging:
5455
needs: build-website-staging
5556
uses: ./.github/workflows/deploy-website-staging.yml
57+
secrets: inherit

.github/workflows/deploy-website-staging.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
name: Deploy The Cornucopia Website on Staging
33
on:
44
workflow_call:
5+
secrets:
6+
CLOUDFLARE_STAGING_API_TOKEN:
7+
description: "Cloudflare API token for staging"
8+
required: true
9+
CLOUDFLARE_STAGING_ACCOUNT_ID:
10+
description: "Cloudflare account ID for staging"
11+
required: true
512
workflow_dispatch:
613
permissions:
714
contents: read
@@ -57,6 +64,3 @@
5764
accountId: ${{ secrets.CLOUDFLARE_STAGING_ACCOUNT_ID }}
5865
wranglerVersion: "4.18.0"
5966
command: deploy script/nonce-worker.js --config script/wrangler.toml --env staging
60-
env:
61-
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_STAGING_API_TOKEN }}
62-
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_STAGING_ACCOUNT_ID }}

0 commit comments

Comments
 (0)