-
-
Notifications
You must be signed in to change notification settings - Fork 35
66 lines (59 loc) · 1.95 KB
/
release-test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: release test
on:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/release-test.yml
- .goreleaser.yml
jobs:
dockerimage:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest version
id: latest_version
run: |
echo -n 'version=' > $GITHUB_OUTPUT
gh release list --limit 1 | cut -f 1 >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build (slim)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.slim
platforms: linux/amd64,linux/arm64
push: false
tags: |
ghcr.io/k1low/runn:${{ steps.latest_version.outputs.version }}-slim
ghcr.io/k1low/runn:latest-slim
labels: |
org.opencontainers.image.name=runn
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.latest_version.outputs.version }}
org.opencontainers.image.source=https://github.com/k1LoW/runn
- name: Build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: |
ghcr.io/k1low/runn:${{ steps.latest_version.outputs.version }}
ghcr.io/k1low/runn:latest
labels: |
org.opencontainers.image.name=runn
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.latest_version.outputs.version }}
org.opencontainers.image.source=https://github.com/k1LoW/runn