This repository has been archived on 2026-11-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
encapi/.github/workflows/release.yml
T
unkin-agent 4e7087852c
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci / pre-commit (pull_request) Has been cancelled
ci / lint (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
ci / build (pull_request) Has been cancelled
ci / image (pull_request) Has been cancelled
Release only the encapi image with ko
2026-11-20 23:05:15 +11:00

33 lines
1.0 KiB
YAML

name: release
on:
push:
tags: ["v[0-9]*"]
permissions:
contents: read
packages: write
jobs:
release:
runs-on: iuclabs-release
env:
KO_DOCKER_REPO: ghcr.io/iuclabs/encapi
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
go-version-file: go.mod
- run: |
go install github.com/google/ko@v0.19.1
go install github.com/google/go-containerregistry/cmd/crane@v0.22.1
- run: echo "${GITHUB_TOKEN}" | crane auth login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: >-
ko build --bare --sbom=none --platform linux/amd64 --tags "${VERSION}"
--image-label org.opencontainers.image.source=https://github.com/IUCLabs/encapi
./cmd/encapi
- run: crane tag "${KO_DOCKER_REPO}:${VERSION}" latest