From 52154f45853ae22ad72fdbf7a3e765fa15e0bf9b Mon Sep 17 00:00:00 2001 From: Felipe Martin <812088+fmartingr@users.noreply.github.com> Date: Sat, 21 Dec 2024 08:02:08 +0100 Subject: [PATCH] ci: ignore build steps for dependabot (#1033) * ci: ignore build steps for dependabot prs * ci: Prevent delete-tag job for PRs from forks --- .github/workflows/pull_request.yml | 6 ++---- .github/workflows/pull_request_closed.yml | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 1c422b981..6daaaf638 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -30,13 +30,11 @@ jobs: uses: ./.github/workflows/_gorelease.yml call-buildx: needs: call-gorelease - # only build on pull requests from the same repo for now - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ startsWith(github.head_ref, 'dependabot/') }} uses: ./.github/workflows/_buildx.yml call-buildx-alpine: needs: call-gorelease - # only build on pull requests from the same repo for now - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !startsWith(github.head_ref, 'dependabot/') }} uses: ./.github/workflows/_buildx.yml with: tag_prefix: alpine- diff --git a/.github/workflows/pull_request_closed.yml b/.github/workflows/pull_request_closed.yml index c5d5f8276..c1a6da1de 100644 --- a/.github/workflows/pull_request_closed.yml +++ b/.github/workflows/pull_request_closed.yml @@ -8,5 +8,6 @@ on: jobs: delete-tag: uses: ./.github/workflows/_delete-registry-tag.yml + if: github.event.pull_request.head.repo.fork == false with: tag_name: pr-${{ github.event.pull_request.number }}