Skip to content

Commit 2aa9e5a

Browse files
committed
fix(agentless): use the github built-ins for event type detection
1 parent fafe1d4 commit 2aa9e5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/agentless-container.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
6666
# GITHUB_BASE_REF is only set when the action source event is a pull request.
6767
# in that case don't push.
68-
export PUSH=$(if [ -z ${GITHUB_BASE_REF+x} ]; then echo "--push"; else echo ""; fi)
68+
export PUSH=$(if [ ${{ github.event_name }} != 'pull_request' ]; then echo "--push"; else echo ""; fi)
6969
docker buildx build $PUSH --platform linux/amd64,linux/arm64 $TAGS --metadata-file=metadata.json -f ../containers/agentless/Dockerfile ../containers/agentless
7070
7171
cat metadata.json
@@ -75,7 +75,7 @@ jobs:
7575
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
7676
- name: Generate artifact attestation
7777
uses: actions/attest-build-provenance@v2
78-
if: ${{ env.GITHUB_BASE_REF != '' }}
78+
if: ${{ github.event_name != 'pull_request' }}
7979
with:
8080
subject-name: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}/agentless
8181
subject-digest: ${{ steps.build.outputs.digest }}

0 commit comments

Comments
 (0)