Skip to content

Commit

Permalink
fix: make strict rules on amd64 experimental builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Bidon15 committed Sep 20, 2023
1 parent 57f3515 commit fb4eca7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/reusable_dockerfile_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,15 @@ jobs:
# only push if the branch/PR is not generated from a fork. Even though
# forks can't push, we still want to try and build the image to catch
# bugs. For testing purposes we only need an amd64 image.
- name: Build and Push Docker Image amd64
- name: Build and Push Experimental Docker Image amd64
# This will run only when the event is a push to a branch that is not 'main'
# and the ref is not a release candidate or release tag.
if: >-
github.event_name == 'push' &&
github.ref != 'refs/heads/main' &&
!startsWith(github.ref, 'refs/tags/v') &&
!startsWith(github.ref, 'refs/tags/v') &&
!contains(github.ref, '-rc')
uses: docker/build-push-action@v4
env:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
Expand All @@ -150,9 +158,7 @@ jobs:
provenance: false
platforms: linux/amd64
# Only push if the head and base repos match, meaning it is not a fork
# yamllint disable
push: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
# yamllint enable
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ${{ inputs.dockerfile }}
Expand Down

0 comments on commit fb4eca7

Please sign in to comment.