Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run on PR from repo fork #100

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
uses: docker/setup-buildx-action@v3.0.0

- name: Log into registry ${{ env.REGISTRY }}
if: ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -68,14 +69,16 @@ jobs:
platforms: ${{ matrix.platform }}
provenance: true
sbom: true
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}

- name: Export digest
if: ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
if: ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
uses: actions/upload-artifact@v3
with:
name: digests
Expand All @@ -85,6 +88,7 @@ jobs:

merge:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
needs:
- build
permissions:
Expand Down