2023-01-11 09:13:59 +01:00
|
|
|
name: build
|
2023-01-06 12:42:58 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
2023-01-11 09:13:59 +01:00
|
|
|
goreleaser:
|
2023-01-06 12:42:58 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-11 09:13:59 +01:00
|
|
|
container:
|
|
|
|
image: goreleaser/goreleaser-cross
|
|
|
|
environment: build
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.19.3
|
2023-01-06 12:42:58 +01:00
|
|
|
|
2023-01-11 09:13:59 +01:00
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build-publish:
|
|
|
|
runs-on: ubuntu-latest
|
2023-01-06 12:42:58 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: docker/login-action@v1.14.1
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: docker compose build push
|
|
|
|
env:
|
|
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
|
|
run: |
|
|
|
|
export TAG=$GITHUB_REF_NAME
|
|
|
|
docker-compose -f docker-compose.build.yaml build --progress plain
|
|
|
|
docker-compose -f docker-compose.build.yaml push
|
|
|
|
export TAG=latest
|
|
|
|
docker-compose -f docker-compose.build.yaml build --progress plain
|
2023-01-11 09:13:59 +01:00
|
|
|
docker-compose -f docker-compose.build.yaml push
|
|
|
|
|