ci: fix master tag #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Docker Login | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish master tag | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: ghcr.io/parkour-vienna/distrust:master | |
context: dist/distrust_linux_amd64_v1 | |
file: Dockerfile | |
- name: Clear | |
if: always() | |
run: rm -f ${HOME}/.docker/config.json |