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
33 lines
1.0 KiB
YAML
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
|