Fix devcontainer smoke test for forked repos
When we run the smoke test on main, we push the devcontainer images to ghcr to be used as a cache for future workflow runs. This causes an error on forks because they don't have permission to push (which is good). So, let's set the step to never push if the repo is a fork. The github context doesn't have a way of checking if the repo is a fork, so I check the repo owner instead, but that's ok since it's the repo owner (rails) who has permissions to push the package.
This commit is contained in:
parent
778039b896
commit
9928479d7c
@ -46,5 +46,6 @@ jobs:
|
||||
imageName: ghcr.io/rails/smoke-test-devcontainer
|
||||
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
|
||||
imageTag: ${{ matrix.DATABASE }}
|
||||
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
|
||||
refFilterForPush: refs/heads/main
|
||||
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test
|
Loading…
Reference in New Issue
Block a user