mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-25 11:07:43 +08:00
ci: Fix runner builds for pull requests coming from "master" branches of forks (#1983)
* ci: Fix runner builds but not pushes for forks I noticed that our runners workflow is failing on docker-login due to that a pull request workflow job from a fork does not have access to repo secrets. https://github.com/malachiobadeyi/actions-runner-controller/actions/runs/3390463793/jobs/5634638183 Can we try this, so that hopefully it suppresses docker-login for pull requests from forks? * Update .github/workflows/runners.yaml * fixup! Update .github/workflows/runners.yaml Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> * fixup! fixup! Update .github/workflows/runners.yaml Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
@@ -32,14 +32,14 @@ runs:
|
||||
version: latest
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: ${{ github.event_name == 'release' || github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
if: ${{ github.event_name == 'release' || github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.password != '' }}
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ inputs.username }}
|
||||
password: ${{ inputs.password }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: ${{ github.event_name == 'release' || github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
if: ${{ github.event_name == 'release' || github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ghcr_password != '' }}
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
||||
Reference in New Issue
Block a user