Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to use new secrets mgmt #3

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
permissions:
id-token: write
contents: read
environment: DEV
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -40,15 +41,16 @@ jobs:
continue-on-error: false
env:
TF_VAR_env: dev
TF_VAR_r2_access_key: ${{secrets.R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.R2_SECRET_KEY}}
TF_VAR_r2_access_key: ${{secrets.TF_R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.TF_R2_SECRET_KEY}}

build-release:
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
actions: read
environment: DEV
strategy:
matrix:
node: ['20.x']
Expand All @@ -63,7 +65,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.SEMANTIC_RELEASE_PAT }}
token: ${{ secrets.GH_SEMANTIC_RELEASE_PAT }}

- uses: AnimMouse/setup-rclone@v1

Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
terraform-format-validate:
runs-on: ubuntu-latest

environment: PR

permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -101,8 +103,8 @@ jobs:
continue-on-error: false
env:
TF_VAR_env: dev
TF_VAR_r2_access_key: ${{secrets.R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.R2_SECRET_KEY}}
TF_VAR_r2_access_key: ${{secrets.TF_R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.TF_R2_SECRET_KEY}}

- name: Terraform validate
id: validate
Expand All @@ -111,8 +113,8 @@ jobs:
continue-on-error: false
env:
TF_VAR_env: dev
TF_VAR_r2_access_key: ${{secrets.R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.R2_SECRET_KEY}}
TF_VAR_r2_access_key: ${{secrets.TF_R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.TF_R2_SECRET_KEY}}

terraform-plan:
runs-on: ubuntu-latest
Expand All @@ -121,6 +123,7 @@ jobs:
permissions:
id-token: write
contents: read
environment: PR
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -163,5 +166,5 @@ jobs:
continue-on-error: false
env:
TF_VAR_env: ${{matrix.env}}
TF_VAR_r2_access_key: ${{secrets.R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.R2_SECRET_KEY}}
TF_VAR_r2_access_key: ${{secrets.TF_R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.TF_R2_SECRET_KEY}}
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
status: 'request'

terraform-prod:
environment: Production
environment: PROD
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down Expand Up @@ -56,15 +56,16 @@ jobs:
continue-on-error: false
env:
TF_VAR_env: prod
TF_VAR_r2_access_key: ${{secrets.R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.R2_SECRET_KEY}}
TF_VAR_r2_access_key: ${{secrets.TF_R2_ACCESS_KEY}}
TF_VAR_r2_secret_key: ${{secrets.TF_R2_SECRET_KEY}}

build-release:
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
actions: read
environment: PROD
strategy:
matrix:
node: ['20.x']
Expand All @@ -79,7 +80,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.SEMANTIC_RELEASE_PAT }}
token: ${{ secrets.GH_SEMANTIC_RELEASE_PAT }}

- uses: AnimMouse/setup-rclone@v1

Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
env:
CLOUDFLARE: true
ENVIRONMENT: prod
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_PAT }}
GITHUB_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_PAT }}
R2_ACCESS_KEY: ${{secrets.R2_ACCESS_KEY}}
R2_SECRET_KEY: ${{secrets.R2_SECRET_KEY}}

Expand Down
Loading