Release only the encapi image with ko
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
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
This commit is contained in:
@@ -62,4 +62,3 @@ jobs:
|
||||
env:
|
||||
GOTOOLCHAIN: auto
|
||||
KO_DOCKER_REPO: ghcr.io/iuclabs/encapi
|
||||
KO_DEFAULTBASEIMAGE: gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
@@ -2,38 +2,31 @@ name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
tags: ["v[0-9]*"]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
VAULT_ADDR: https://vault.service.consul:8200
|
||||
|
||||
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
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- uses: hashicorp/vault-action@892a26828f195e65540a40b4768ae4571f51ebfc # v4.0.0
|
||||
with:
|
||||
url: ${{ env.VAULT_ADDR }}
|
||||
method: jwt
|
||||
path: jwt/github/iuclabs
|
||||
role: release
|
||||
jwtGithubAudience: ${{ env.VAULT_ADDR }}
|
||||
exportToken: true
|
||||
- uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: v2.20.2
|
||||
args: release --clean
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user