-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (65 loc) · 2.13 KB
/
release.yaml
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
66
67
68
69
name: release
on:
push:
tags:
- 'v*'
branches:
- "main"
permissions:
contents: write
packages: write
jobs:
changelog:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- id: semver_parser
uses: release-kit/semver@v2
with:
string: ${{ github.ref_name }}
- id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
excludeTypes: ""
excludeScopes: ""
- uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: ${{ steps.semver_parser.outputs.prerelease == '' }}
prerelease: ${{ steps.semver_parser.outputs.prerelease != '' }}
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- id: buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.event.repository.owner.name }}/scribe:${{ github.ref_name }}
labels: |
org.opencontainers.image.title="scribe"
org.opencontainers.image.authors="anza-labs contributors"
org.opencontainers.image.vendor="anza-labs"
org.opencontainers.image.license="Apache-2.0"
org.opencontainers.image.source="https://github.com/anza-labs/scribe"
org.opencontainers.image.base.name="gcr.io/distroless/static:nonroot"
org.opencontainers.image.created=${{ github.event.created_at }}