From a1c8506289d73143cd96bcf19c639dc747d0a2d7 Mon Sep 17 00:00:00 2001 From: Felipe M Date: Sun, 30 Jul 2023 07:47:07 +0200 Subject: [PATCH 1/3] properly tag rc releases --- .github/workflows/_buildx.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/_buildx.yml b/.github/workflows/_buildx.yml index 467aeb72a..addbcb0c3 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 From 4fef11a42e41aff1fad48feda7ec2fc30e22a8b4 Mon Sep 17 00:00:00 2001 From: Felipe M Date: Sun, 30 Jul 2023 07:47:17 +0200 Subject: [PATCH 2/3] avoid builds on forked prs --- .github/workflows/pull_request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 5818fa905..66f54ab9e 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_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository uses: ./.github/workflows/_buildx.yml From 4eef16a046bdff1cf2533e46356307f74b65001a Mon Sep 17 00:00:00 2001 From: Felipe M Date: Sun, 30 Jul 2023 07:59:27 +0200 Subject: [PATCH 3/3] simplify condition --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 66f54ab9e..b4b0c6ec3 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,5 +20,5 @@ jobs: call-buildx: needs: call-gorelease # only build on pull requests from the same repo for now - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.repo.full_name == github.repository uses: ./.github/workflows/_buildx.yml