Skip to content

Commit

Permalink
Improve conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
invliD committed Feb 24, 2024
1 parent b90b5f0 commit 12ed828
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,33 @@ 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: .
platforms: ${{ matrix.os }}/${{ matrix.arch }}
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 }}
Expand All @@ -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
Expand Down

0 comments on commit 12ed828

Please sign in to comment.