-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (77 loc) · 2.22 KB
/
release.yaml
File metadata and controls
90 lines (77 loc) · 2.22 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Create New Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26.2'
- name: Run Tests
working-directory: ./src
run: go test -v ./...
goreleaser:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26.2'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
driver: docker-container
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
args: release --clean
distribution: goreleaser
version: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
driver: docker-container
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Images
run: |
docker buildx build --platform linux/amd64,linux/arm64,linux/386 \
--build-arg VERSION=${{ github.ref_name }} \
-t ghcr.io/daemondude23/helmizer/helmizer:${{ github.ref_name }} \
-t ghcr.io/daemondude23/helmizer/helmizer:latest \
--push .
docker buildx build --platform linux/amd64,linux/arm64 \
-f Dockerfile.helm \
--build-arg VERSION=${{ github.ref_name }} \
-t ghcr.io/daemondude23/helmizer/helmizer-helm:${{ github.ref_name }} \
-t ghcr.io/daemondude23/helmizer/helmizer-helm:latest \
--push .
permissions:
contents: write
packages: write