Skip to content

Commit

Permalink
disable google auth for PRs, forks and dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga authored Nov 29, 2023
1 parent 27c8cc0 commit 1366fc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/actions/prep-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ runs:
shell: sh
run: scripts/install_toolchain.sh

- name: Disable cache on forks and dependabot
if: github.event_name == 'pull_request'
shell: sh
run: |
if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ] || \
[ "${{ github.actor }}" == "dependabot[bot]" ] || \
[ "${{ github.actor }}" == "dependabot-preview[bot]" ]; then
echo "disable_cache=true" >> $GITHUB_ENV
fi
- name: SCcache setup
if: ${{ inputs.cache == 'enabled' }}
if: ${{ inputs.cache == 'enabled' && !env.disable_cache }}
uses: ./.github/actions/sccache-gcloud
with:
GWIP: ${{ inputs.GWIP }}
GSA: ${{ inputs.GSA }}



1 change: 1 addition & 0 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
path: ./${{ matrix.package }}-srtool-wasm-report.json

- id: 'auth'
if: github.event_name != 'pull_request'
uses: 'google-github-actions/auth@67e9c72af6e0492df856527b474995862b7b6591' # v2.0.0
with:
workload_identity_provider: ${{ secrets.GWIP_ARTIFACTS }}
Expand Down

0 comments on commit 1366fc8

Please sign in to comment.