File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 registry : ${{ inputs.registry }}
7272 username : ${{ github.actor }}
7373 password : ${{ secrets.GITHUB_TOKEN }}
74+ - name : Build
75+ if : github.event_name == 'pull_request'
76+ id : build
77+ uses : docker/build-push-action@v5
78+ with :
79+ context : ${{ inputs.context }}
80+ platforms : ${{ inputs.platform }}
81+ file : ${{ inputs.dockerfile }}
82+ labels : ${{ steps.meta.outputs.labels }}
83+ outputs : type=docker,name=${{ env.REGISTRY }}/${{ steps.lower-repo.outputs.IMAGE_NAME }}
84+ build-args : |
85+ ${{ inputs.build-args }}
86+ BASE=${{ inputs.base }}
87+ cache-from : type=gha
88+ cache-to : type=gha,mode=max
7489 - name : Build and push by digest
90+ if : github.event_name != 'pull_request'
7591 id : build
7692 uses : docker/build-push-action@v5
7793 with :
87103 cache-from : type=gha
88104 cache-to : type=gha,mode=max
89105 - name : Export digest
106+ if : github.event_name != 'pull_request'
90107 run : |
91108 mkdir -p /tmp/digests
92109 digest="${{ steps.build.outputs.digest }}"
97114 SAFE_PLATFORM=$(echo "${{ inputs.platform }}" | sed 's|/|-|g')
98115 echo "name=$SAFE_PLATFORM" >> $GITHUB_OUTPUT
99116 - name : Upload digest
117+ if : github.event_name != 'pull_request'
100118 uses : actions/upload-artifact@v4
101119 with :
102120 name : ${{ inputs.digest-prefix }}${{ steps.platform.outputs.name }}
You can’t perform that action at this time.
0 commit comments