Skip to content

Commit

Permalink
Quay login only works if commit is in master
Browse files Browse the repository at this point in the history
GitHub Action environment variables gets passed to PR only if they
starts from a branch that is local, so fork does not get a QUAY PASSOWRD
and USERNAME, this is to avoid security issue.

GitHub is working at it but for now that's what we have.

We push images to Quay only if the commit is in master, but during a
re-work of the GitHub Action we login all the time. And that's a bug.

Signed-off-by: Gianluca Arbezzano <[email protected]>
  • Loading branch information
Gianluca Arbezzano committed Oct 16, 2020
1 parent 841311d commit 0cd07a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: Login to quay.io
uses: docker/login-action@v1
if: ${{ startsWith(github.ref, 'refs/heads/master') }}
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
Expand Down

0 comments on commit 0cd07a0

Please sign in to comment.