From afacf40ec827165279d861991e2ab22a92d7f0df Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 5 Jan 2026 16:20:51 -0800 Subject: [PATCH] Update build to better detect tags and versions --- .gitea/workflows/build.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 99ad279..99ede9a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -3,22 +3,20 @@ on: push: branches: - main - - master tags: - "v*" pull_request: branches: - main - - master jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@v5 with: go-version-file: go.mod @@ -28,15 +26,15 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@v5 with: go-version-file: go.mod - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v5 - name: Run pre-commit uses: https://git.iamthefij.com/iamthefij/pre-commit-action@v3.0.2 @@ -55,17 +53,17 @@ jobs: - name: Build binaries env: - VERSION: "${{ vars.REF_NAME }}" + VERSION: "${{ github.REF_NAME }}" run: make all # Package binaries and create release if this is a tagged build - name: Compress binaries - if: "${{ github.event_name == 'tag' }}" + if: "${{ github.ref_type == 'tag' }}" run: find ./dist -type f -executable -execdir tar -czvf {}.tar.gz {} \; - name: Upload release uses: https://gitea.com/actions/gitea-release-action@v1 - if: "${{ github.event_name == 'tag' }}" + if: "${{ github.ref_type == 'tag' }}" with: files: |- dist/*.tar.gz @@ -89,6 +87,7 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 + if: "${{ github.event_name != 'pull_request' }}" with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -108,6 +107,5 @@ jobs: platforms: | linux/amd64 linux/arm64 - linux/arm tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}