Files
dcmerge/.gitea/workflows/release.yaml
Markus Pesch 4e84183c14
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
Release / Release application (push) Successful in 8m42s
Release / Upload Images to docker.io (push) Successful in 51s
fix(ci): install curl, syft and configure buildx
2026-01-31 22:26:52 +01:00

73 lines
2.3 KiB
YAML

name: Release
on:
push:
tags: [ '**' ]
permissions:
contents: write
jobs:
release:
name: "Release application"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Install curl
run: apt-get update && apt-get install --yes curl
- name: Install syft
env:
SYFT_VERSION: "1.41.1" # renovate: datasource=github-releases depName=anchore/syft
run: |
OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(dpkg --print-architecture)"
curl \
--fail \
--location \
--silent \
--output syft_${SYFT_VERSION}_${OS}_${ARCH}.deb \
"https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_${OS}_${ARCH}.deb"
dpkg -i syft_${SYFT_VERSION}_${OS}_${ARCH}.deb
rm syft_${SYFT_VERSION}_${OS}_${ARCH}.deb
- uses: docker/setup-qemu-action@v3.7.0
- uses: docker/setup-buildx-action@v3.12.0
- uses: actions/setup-go@v6.2.0
with:
go-version: stable
- uses: docker/login-action@v3.6.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- env:
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
GONOSUMDB: ${{ vars.GONOSUMDB }}
GOPROXY: ${{ vars.GOPROXY }}
uses: goreleaser/goreleaser-action@v6.4.0
with:
version: v2.13.3 # renovate: datasource=github-releases depName=goreleaser/goreleaser
args: release --clean
sync-to-hub-docker-io:
name: "Upload Images to docker.io"
needs:
- release
runs-on: ubuntu-latest
steps:
- name: Copy images to docker.io
run: |
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
apt-get update --yes
apt-get install --yes skopeo
skopeo copy \
--all \
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
--src-username volker.raschek \
docker://git.cryptic.systems/volker.raschek/dcmerge:${TAG} \
docker://docker.io/volkerraschek/dcmerge:${TAG}