-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.31 KB
/
release.yml
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
name: Release
on:
push:
tags:
- v*.*.*
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "APP_VERSION=$(echo ${GITHUB_REF:11})" >> $GITHUB_ENV
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
id: buildx
- name: Builder instance name
run: echo ${{ steps.buildx.outputs.name }}
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/traptitech/traq-system-bot:latest
ghcr.io/traptitech/traq-system-bot:${{ env.APP_VERSION }}
cache-from: type=registry,ref=ghcr.io/traptitech/traq-system-bot:buildcache
cache-to: type=registry,ref=ghcr.io/traptitech/traq-system-bot:buildcache,mode=max
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true