From 8bf16832f05f9f72799e2b3f72cec77fa2c8b898 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Wed, 13 May 2020 09:26:18 +0100 Subject: [PATCH] Don't try to push image if you're not a member Otherwise, all CI will fail, just like it's happening in [this run][1] from #30. [1]: https://github.com/Tecnativa/docker-duplicity/runs/663169029?check_suite_focus=true --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dc73a073..faf69bb4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,6 +37,7 @@ jobs: with: add_git_labels: true password: ${{ secrets.GITHUB_TOKEN }} + push: ${{ github.event.pull_request.author_association == 'MEMBER' }} registry: docker.pkg.github.com repository: tecnativa/docker-duplicity/testing-pr-${{ github.event.number }} username: ${{ github.actor }} @@ -50,6 +51,7 @@ jobs: with: add_git_labels: true password: ${{ secrets.GITHUB_TOKEN }} + push: ${{ github.event.pull_request.author_association == 'MEMBER' }} registry: docker.pkg.github.com repository: tecnativa/docker-duplicity/testing-pr-${{ github.event.number }} username: ${{ github.actor }} @@ -63,6 +65,7 @@ jobs: with: add_git_labels: true password: ${{ secrets.GITHUB_TOKEN }} + push: ${{ github.event.pull_request.author_association == 'MEMBER' }} registry: docker.pkg.github.com repository: tecnativa/docker-duplicity/testing-pr-${{ github.event.number }} username: ${{ github.actor }} @@ -76,6 +79,7 @@ jobs: with: add_git_labels: true password: ${{ secrets.GITHUB_TOKEN }} + push: ${{ github.event.pull_request.author_association == 'MEMBER' }} registry: docker.pkg.github.com repository: tecnativa/docker-duplicity/testing-pr-${{ github.event.number }} username: ${{ github.actor }} @@ -89,6 +93,7 @@ jobs: with: add_git_labels: true password: ${{ secrets.GITHUB_TOKEN }} + push: ${{ github.event.pull_request.author_association == 'MEMBER' }} registry: docker.pkg.github.com repository: tecnativa/docker-duplicity/testing-pr-${{ github.event.number }} username: ${{ github.actor }}