Skip to content

Commit

Permalink
Fixes workflow for forked repo pr
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Feb 21, 2024
1 parent 12142ee commit 8bdb5a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ permissions:
jobs:
build-containers:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
permissions:
packages: write
steps:
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
if: ${{ github.event_name == 'pull_request' && always() && ! cancelled() }}
needs: build-containers
container:
image: ghcr.io/esmci/cime:sha-${{ github.sha }}
image: ghcr.io/esmci/cime:${{ github.event.pull_request.head.repo.full_name == github.repository && "sha-{{ github.sha }}" || 'latest' }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
if: ${{ github.event_name == 'pull_request' && always() && ! cancelled() }}
needs: build-containers
container:
image: ghcr.io/esmci/cime:sha-${{ github.sha }}
image: ghcr.io/esmci/cime:${{ github.event.pull_request.head.repo.full_name == github.repository && "sha-{{ github.sha }}" || 'latest' }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 8bdb5a2

Please sign in to comment.