This repository was archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (91 loc) · 3.29 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Release
on:
push:
tags:
- '*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: "riotkit-org/backup-repository"
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build
run: "make build"
- name: Release binaries to GitHub releases
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: binary
path: .build/backup-repository
release-docker:
runs-on: ubuntu-latest
needs: ["build"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: binary
path: .build/
- name: Log in to the Container registry
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and release to container registry
uses: docker/build-push-action@v2
with:
context: .
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
chart-release:
runs-on: ubuntu-latest
needs: ["build", "release-docker"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Publish Helm chart
uses: stefanprodan/helm-gh-pages@master
with:
token: "${{ secrets.GH_RW_TOKEN }}"
charts_dir: helm
charts_url: https://riotkit-org.github.io/helm-of-revolution
owner: riotkit-org
repository: helm-of-revolution
branch: gh-pages
target_dir: ./
commit_username: "${{ env.GITHUB_ACTOR }}"
commit_email: "${{ env.GITHUB_ACTOR }}@users.noreply.github.com"
app_version: "${{github.ref_name}}"
chart_version: "${{github.ref_name}}"