-
Notifications
You must be signed in to change notification settings - Fork 39
60 lines (50 loc) · 1.51 KB
/
release.yml
File metadata and controls
60 lines (50 loc) · 1.51 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
name: Publish Release
on:
push:
tags:
- '*.*'
jobs:
release:
name: Publish Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Publish Release
uses: leomotors/auto-publish-release@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
title: 'programming.in.th'
tag: ${{ github.ref_name }}
image:
name: Docker Image
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: winterjung/split@v2
id: version
with:
msg: ${{ github.ref_name }}
separator: '.'
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: ghcr.io/programming-in-th/programming.in.th:${{ github.ref_name }},ghcr.io/programming-in-th/programming.in.th:v${{ steps.version.outputs._0 }},ghcr.io/programming-in-th/programming.in.th:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max