Skip to content

Commit

Permalink
fix workload permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal-Delange committed Dec 16, 2024
1 parent bcdbab5 commit 4f22bff
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/backend_deploy_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
description: "version to deploy"
required: true

permissions:
contents: read
id-token: "write" # needed for using open id token to authenticate with GCP

jobs:
build_and_deploy_backend:
name: Build and deploy back-end
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/backend_test_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Test back-end

on: [workflow_call]

permissions:
contents: read
pull-requests: read
checks: write

jobs:
test_backend:
name: Test back-end
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ concurrency:

jobs:
test_backend:
permissions:
contents: read
pull-requests: read
checks: write
uses: ./.github/workflows/backend_test_workflow.yaml
7 changes: 7 additions & 0 deletions .github/workflows/deploy_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ concurrency:

jobs:
test_backend:
permissions:
contents: read
pull-requests: read
checks: write
uses: ./.github/workflows/backend_test_workflow.yaml

build_and_deploy_backend:
needs: test_backend
uses: ./.github/workflows/backend_deploy_workflow.yaml
permissions:
contents: read
id-token: "write" # needed for using open id token to authenticate with GCP services
with:
environment: "production"
version: ${{ github.ref_name }}
7 changes: 7 additions & 0 deletions .github/workflows/deploy_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ concurrency:

jobs:
test_backend:
permissions:
contents: read
pull-requests: read
checks: write
uses: ./.github/workflows/backend_test_workflow.yaml

build_and_deploy_backend:
needs: test_backend
uses: ./.github/workflows/backend_deploy_workflow.yaml
permissions:
contents: read
id-token: "write" # needed for using open id token to authenticate with GCP services
with:
environment: "staging"
version: latest

0 comments on commit 4f22bff

Please sign in to comment.