61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
name: Create Release & Upload Assets
|
|
|
|
on:
|
|
push:
|
|
# Sequence of patterns matched against refs/tags
|
|
tags:
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
env:
|
|
VERSION_TAG: '${{ github.ref_name }}'
|
|
CURL_TOKEN: '${{ secrets.TOKEN_GITEA }}'
|
|
|
|
jobs:
|
|
goreleaser:
|
|
name: Upload Assets To Gitea w/ goreleaser
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.25.1
|
|
-
|
|
name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v6
|
|
with:
|
|
distribution: goreleaser
|
|
version: v2.12.5
|
|
args: release --clean
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TOKEN_GITEA }}
|
|
GORELEASER_FORCE_TOKEN: gitea
|
|
build-image:
|
|
needs: goreleaser
|
|
name: Build Container Image
|
|
runs-on: ubuntu-latest
|
|
container: ghcr.io/catthehacker/ubuntu:act-latest
|
|
env:
|
|
IMAGE_NAME: chronical
|
|
REGISTRY: git.anomalous.dev
|
|
REPO_OWNER: 57_wolve
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.anomalous.dev
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.TOKEN_GITEA }}
|
|
- name: Build and Push to Registry
|
|
run: |
|
|
docker build --build-arg VERSION=$VERSION_TAG --build-arg TOKEN=$CURL_TOKEN -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${{ github.ref_name }} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${{ github.ref_name }}
|
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|