Skip to content

Commit

Permalink
Skip pushing artifacts on forks
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Jul 3, 2024
1 parent 2a02323 commit 3640598
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/docker-build-test-upload.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Build a new image and then upload the image, tags and manifests to GitHub artifacts
name: Build and test a new image, upload it as artifact

env:
OWNER: ${{ github.repository_owner }}
Expand Down Expand Up @@ -56,23 +56,23 @@ jobs:
BUILDKIT_PROGRESS: plain
shell: bash

- name: Run tests ✅
uses: ./.github/actions/integration-tests
with:
architecture: ${{ inputs.architecture }}
runsOn: ${{ inputs.runsOn }}

- name: Save image as a tar for later use 💾
run: |
mkdir -p /tmp/aiidalab/
docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar
shell: bash
if: always()
if: ${{ !github.event.pull_request.head.repo.fork }}

- name: Upload image as artifact 💾
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.image }}-${{ inputs.architecture }}
path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar
retention-days: 3
if: always()
if: ${{ !github.event.pull_request.head.repo.fork }}

- name: Run tests ✅
uses: ./.github/actions/integration-tests
with:
architecture: ${{ inputs.architecture }}
runsOn: ${{ inputs.runsOn }}

0 comments on commit 3640598

Please sign in to comment.