Skip to content

Commit

Permalink
fix: various workflow updates (GoogleCloudPlatform#3315)
Browse files Browse the repository at this point in the history
* fix: updating checkout version and various workflow permissions

* fix: other workflow updates
  • Loading branch information
pattishin committed Jun 30, 2023
1 parent da4e83f commit cfc5c03
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 28 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ai-platform-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
defaults:
run:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/automl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
defaults:
run:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
- uses: actions/setup-node@v3
with:
node-version: 14
Expand All @@ -37,7 +37,7 @@ jobs:
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
- uses: JustinBeckwith/linkinator-action@v1
with:
paths: "**/*.md"
Expand All @@ -48,5 +48,5 @@ jobs:
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
- run: ./.github/workflows/utils/region-tags-tests.sh
3 changes: 1 addition & 2 deletions .github/workflows/dialogflow-cx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
defaults:
run:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/functions-slack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ on:
jobs:
test:
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'

if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
runs-on: ubuntu-latest
timeout-minutes: 120
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/iam-deny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ on:
jobs:
test:
permissions:
contents: 'write'
pull-requests: 'write'
id-token: 'write'

contents: 'read'
id-token: 'write'
if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
runs-on: ubuntu-latest
timeout-minutes: 120
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/security-center-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ on:
jobs:
test:
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/storagetransfer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ on:
jobs:
test:
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
defaults:
run:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/utils/ci-secrets.yaml.njk
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
defaults:
run:
working-directory: '{{ path }}'
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v3.5.3
with:
ref: ${% raw %}{{github.event.pull_request.head.sha}}{% endraw %}
- uses: 'google-github-actions/auth@v1.0.0'
- uses: 'google-github-actions/auth@v1.1.1'
with:
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
service_account: 'kokoro-system-test@long-door-651.iam.gserviceaccount.com'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/vision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ on:
jobs:
test:
permissions:
contents: 'write'
pull-requests: 'write'
contents: 'read'
id-token: 'write'
if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
runs-on: ubuntu-latest
Expand Down

0 comments on commit cfc5c03

Please sign in to comment.