Skip to content

Commit c5b4e0f

Browse files
committed
These changes migrate this repo's GitHub Actions Workflows to use ESC secrets instead of GitHub Secrets.
The changes are largely mechanical: - Common configuration for all ESC actions within a workflow is added to the workflow's environment variables - Permissions are expanded as necessary for workflows that do not grant `id-token: write` permissions - `read-all` permissions are replaced with the union of all explicit read permissions and `id-token: write` - Default permissions are replaced with `write-all`, which is the equivalent of all explicit write permissions and `id-token: write` - Explicit permissions are modified to grant `id-token: write` - A step that fetches ESC secrets and populates environment variables is added to each step that reads secrets - Direct references to secrets within the job are replaced with references to the step's outputs All ESC actions are configured to fetch secrets from a shared ESC environment that contains secrets migrated from GitHub Actions. The ESC action performs its own OIDC exchange to obtain a Pulumi Access Token.
1 parent 1450f5a commit c5b4e0f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/bucket-cleanup.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ env:
33
ESC_ACTION_OIDC_ORGANIZATION: pulumi
44
ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization
55
ESC_ACTION_ENVIRONMENT: github-secrets/pulumi-registry
6+
ESC_ACTION_OIDC_AUTH: true
7+
ESC_ACTION_OIDC_ORGANIZATION: pulumi
8+
ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization
9+
ESC_ACTION_ENVIRONMENT: imports/github-secrets
610
ESC_ACTION_EXPORT_ENVIRONMENT_VARIABLES: false
711
name: "Scheduled jobs: Bucket cleanup"
812
on:
@@ -22,6 +26,9 @@ jobs:
2226
environment: production
2327
runs-on: ubuntu-latest
2428
steps:
29+
- name: Fetch secrets from ESC
30+
id: esc-secrets
31+
uses: pulumi/esc-action@v1
2532
- name: Fetch secrets from ESC
2633
id: esc-secrets
2734
uses: pulumi/esc-action@cf5b30703ffd5ad60cc3a880c09b3a9592b9372d # v1

0 commit comments

Comments
 (0)