-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (59 loc) · 1.68 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (59 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: release
# Triggered by pushing a semver tag (e.g. v0.1.0). Builds and publishes the
# container image to GHCR, then cuts the GitHub Release.
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
env:
IMAGE: ghcr.io/cozystack/keycloak-kms-proxy
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
- uses: docker/build-push-action@v6
with:
context: .
# pg_query_go links the embedded PostgreSQL parser via cgo and the
# Dockerfile pins GOARCH=amd64, so the image is amd64-only for now.
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.ref_name }}
release:
runs-on: ubuntu-latest
needs: image
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${GITHUB_REF_NAME}" \
--title "${GITHUB_REF_NAME}" \
--verify-tag \
--generate-notes