mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-01-06 01:47:38 +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
|
version: latest
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- 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
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ inputs.username }}
|
username: ${{ inputs.username }}
|
||||||
password: ${{ inputs.password }}
|
password: ${{ inputs.password }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- 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
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|||||||
Reference in New Issue
Block a user