You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autorestic/.github/workflows/build.yml

52 lines
1.3 KiB

4 years ago
name: Main
on:
push:
tags:
10 months ago
- 'v*.*.*'
4 years ago
jobs:
3 years ago
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
2 years ago
uses: docker/setup-qemu-action@v2
3 years ago
- name: Set up Docker Buildx
2 years ago
uses: docker/setup-buildx-action@v2
3 years ago
- name: Docker Labels
id: meta
2 years ago
uses: crazy-max/ghaction-docker-meta@v4
3 years ago
with:
images: cupcakearmy/autorestic
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Login to DockerHub
2 years ago
uses: docker/login-action@v2
3 years ago
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
2 years ago
uses: docker/build-push-action@v3
3 years ago
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
release:
4 years ago
runs-on: ubuntu-latest
steps:
2 years ago
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
4 years ago
with:
10 months ago
go-version: '^1.21'
4 years ago
- name: Build
run: go run build/build.go
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
env:
3 years ago
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}