From 12ed828ede28bfdfce629e008e7acc4dd6c29924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Bru=CC=88ckner?= Date: Fri, 23 Feb 2024 23:32:23 -0800 Subject: [PATCH] Improve conditions --- .github/workflows/go.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fc1d32b..d0d2695 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,25 +26,25 @@ jobs: path: mdns2mqtt-${{ matrix.arch }}.tgz if-no-files-found: error - name: Debian package - if: ${{ matrix.os == 'linux' }} + if: matrix.os == 'linux' uses: bpicode/github-action-fpm@master with: fpm_opts: -s dir -t deb -n mdns2mqtt -a ${{ matrix.arch }} -v 0.0.0 mdns2mqtt=/usr/bin/mdns2mqtt - name: Upload .deb package uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'linux' }} + if: matrix.os == 'linux' with: name: debian-${{ matrix.os }}-${{ matrix.arch }} path: "*.deb" if-no-files-found: error - name: Set up QEMU - if: ${{ matrix.os == 'linux' }} + if: matrix.os == 'linux' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - if: ${{ matrix.os == 'linux' }} + if: matrix.os == 'linux' uses: docker/setup-buildx-action@v3 - name: Build and load - if: ${{ matrix.os == 'linux' }} + if: matrix.os == 'linux' uses: docker/build-push-action@v5 with: context: . @@ -52,7 +52,7 @@ jobs: outputs: type=docker,dest=/tmp/image-${{ matrix.arch }}.tar tags: invlid/mdns2mqtt:latest-${{ matrix.arch }} - name: Upload Docker image - if: ${{ matrix.os == 'linux' }} + if: matrix.os == 'linux' uses: actions/upload-artifact@v4 with: name: docker-image-${{ matrix.arch }} @@ -70,7 +70,7 @@ jobs: run: test -z $(gofmt -l .) || (gofmt -d . && exit 1) publish: needs: compile - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: - name: Download artifact