diff --git a/.github/workflows/_wait_for_workflow.yml b/.github/workflows/_wait_for_workflow.yml index cf9fcde0..8dca0814 100644 --- a/.github/workflows/_wait_for_workflow.yml +++ b/.github/workflows/_wait_for_workflow.yml @@ -67,9 +67,7 @@ jobs: console.log(`Run completed with conclusion: ${run.conclusion}`); core.setOutput("run_id", run.id.toString()); if (run.conclusion === "success") { - if (context.ref !== 'refs/heads/main') { - artifact_exists = "true"; - } + artifact_exists = "true"; } else { core.setFailed(`Workflow ${workflow_name} failed with conclusion: ${run.conclusion}`); } diff --git a/.github/workflows/rebuild-container-images.yml b/.github/workflows/rebuild-container-images.yml index 83d048c1..f0e9489d 100644 --- a/.github/workflows/rebuild-container-images.yml +++ b/.github/workflows/rebuild-container-images.yml @@ -70,12 +70,11 @@ jobs: IMAGE=${{ matrix.image }} cache-from: type=gha,scope=${{ matrix.distro }} cache-to: type=gha,mode=max,scope=${{ matrix.distro }} - push: ${{ github.ref == 'refs/heads/main' }} + push: ${{ github.ref == 'refs/heads/main' && vars.UPLOAD_GHCR != '' }} tags: ghcr.io/${{ env.REPO_NAME }}/epics-training-base-${{ matrix.distro }}:latest - outputs: ${{ (github.ref != 'refs/heads/main') && format('type=docker,dest=/tmp/image-{0}.tar', matrix.distro) || '' }} + outputs: type=docker,dest=/tmp/image-${{ matrix.distro }}.tar - name: Upload image artifact - if: github.ref != 'refs/heads/main' uses: actions/upload-artifact@v7 with: name: epics-training-base-${{ matrix.distro }}-image