From e5f2de09301f25e2923fa2755167b84753e48f00 Mon Sep 17 00:00:00 2001 From: Felipe Martin <812088+fmartingr@users.noreply.github.com> Date: Sun, 30 Jul 2023 08:12:23 +0200 Subject: [PATCH] Fix CI incorrectly tagging RC releases and disables docker builds on forks (#686) * properly tag rc releases * avoid builds on forked prs * simplify condition --- .github/workflows/_buildx.yml | 3 +-- .github/workflows/pull_request.yml | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_buildx.yml b/.github/workflows/_buildx.yml index 467aeb72..addbcb0c 100644 --- a/.github/workflows/_buildx.yml +++ b/.github/workflows/_buildx.yml @@ -26,10 +26,9 @@ jobs: - name: Prepare master push tags if: github.event_name == 'push' && github.ref == 'refs/heads/master' run: | - echo "tag_flags=--tag ${{ github.ref }}" >> $GITHUB_ENV REPO=ghcr.io/${{ github.repository }} TAG=$(git describe --tags) - if [ -z "$(git tag --points-at HEAD)" ] + if [ -z "$(git tag --points-at HEAD)" ] || [ "$TAG" == *"rc"* ] then TAG2="dev" else diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 5818fa90..b4b0c6ec 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -19,4 +19,6 @@ 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 uses: ./.github/workflows/_buildx.yml