forked from crumbhole/argocd-lovely-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (78 loc) · 2.44 KB
/
release.yaml
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
# .github/workflows/release.yaml
name: Release
on:
release:
types: [created]
workflow_dispatch: {}
env:
PLATFORMS: linux/amd64, linux/arm64
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64
goos: [linux, darwin]
steps:
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1.51
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: amd64
goversion: go.mod
binary_name: "argocd-lovely-plugin"
project_path: cmd/argocd-lovely-plugin
extra_files: LICENSE README.md
pre_command: go get ./...
build_sidecar:
name: Build sidecar docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get git tag
uses: little-core-labs/get-git-tag@v3.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build sidecar image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: ${{ env.PLATFORMS }}
tags: |
ghcr.io/crumbhole/argocd-lovely-plugin-cmp:${{ env.GIT_TAG_NAME }}
build-args: VERSION=${{ env.GIT_TAG_NAME }}
build_variations:
name: Build variation docker images
needs: [build_sidecar]
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get git tag
uses: little-core-labs/get-git-tag@v3.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- uses: ./.github/actions/variations
with:
version: ${{ env.GIT_TAG_NAME }}