-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (59 loc) · 2.59 KB
/
Copy pathrelease.yaml
File metadata and controls
69 lines (59 loc) · 2.59 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
66
67
68
69
name: Release
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
- name: Log in to GHCR
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
- name: Build bink binary
run: |
podman build --build-arg VERSION=${{ steps.version.outputs.version }} \
--target builder -t localhost/bink-builder:latest -f Containerfile .
podman create --name bink-builder-tmp localhost/bink-builder:latest
podman cp bink-builder-tmp:/output/bink ./bink
podman rm bink-builder-tmp
chmod +x ./bink
./bink version
- name: Build and push bink image
run: |
make build-bink-image VERSION=${{ steps.version.outputs.version }}
podman tag ${{ env.REGISTRY }}/${{ github.repository }}/bink:latest \
${{ env.REGISTRY }}/${{ github.repository }}/bink:${{ steps.version.outputs.version }}
podman push ${{ env.REGISTRY }}/${{ github.repository }}/bink:${{ steps.version.outputs.version }}
podman push ${{ env.REGISTRY }}/${{ github.repository }}/bink:latest
- name: Build and push cluster image
run: |
make build-cluster-image
podman tag ${{ env.REGISTRY }}/${{ github.repository }}/cluster:latest \
${{ env.REGISTRY }}/${{ github.repository }}/cluster:${{ steps.version.outputs.version }}
podman push ${{ env.REGISTRY }}/${{ github.repository }}/cluster:${{ steps.version.outputs.version }}
podman push ${{ env.REGISTRY }}/${{ github.repository }}/cluster:latest
- name: Build and push dns image
run: |
make build-dns-image
podman tag ${{ env.REGISTRY }}/${{ github.repository }}/dns:latest \
${{ env.REGISTRY }}/${{ github.repository }}/dns:${{ steps.version.outputs.version }}
podman push ${{ env.REGISTRY }}/${{ github.repository }}/dns:${{ steps.version.outputs.version }}
podman push ${{ env.REGISTRY }}/${{ github.repository }}/dns:latest
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ steps.version.outputs.version }} \
./bink \
--title "${{ steps.version.outputs.version }}" \
--generate-notes