Rename pipelines and release binary and image when tagged

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis 2023-10-03 15:26:50 +03:00
parent 2589a0fd48
commit 2ae2b76985
No known key found for this signature in database
GPG Key ID: 286DCAFD2C97DDE3
2 changed files with 26 additions and 6 deletions

View File

@ -1,18 +1,38 @@
--- ---
name: 'Build enki image' name: 'Release enki'
on: on:
push: push:
branches:
- main
tags: tags:
- '*' - 'v*'
concurrency: concurrency:
group: enki-image-${{ github.ref || github.head_ref }} group: release-enki-${{ github.ref || github.head_ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
docker: goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git fetch --prune --unshallow
- name: Generate version
run: echo "VERSION=$(git describe --always --tags --dirty)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.20
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}
build-image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout