This repository was archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
80 lines (78 loc) · 2.39 KB
/
release.yaml
File metadata and controls
80 lines (78 loc) · 2.39 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
name: Publish Release
on:
release:
types: [created]
push:
branches:
- master
paths:
- "**.go"
- "hack/test.sh"
- ".github/workflows/release.yaml"
pull_request:
branches:
- master
paths:
- "**.go"
- "hack/test.sh"
- ".github/workflows/release.yaml"
jobs:
test:
runs-on: ubuntu-18.04
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Test
run: ./hack/test.sh
release:
if: startsWith(github.ref, 'refs/tags/v') == true
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get Docker tags
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: |
kiosksh/kiosk
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push the Debian based image
id: docker_build
uses: docker/build-push-action@v2
with:
file: Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: Images digests
run: echo ${{ steps.docker_build.outputs.digest }}
- uses: azure/setup-helm@v1
with:
version: "v3.0.3"
- run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/v!!p')
helm plugin install https://github.com/chartmuseum/helm-push
helm repo add chartmuseum $CHART_MUSEUM_URL --username $CHART_MUSEUM_USER --password $CHART_MUSEUM_PASSWORD
helm cm-push --force --version="$RELEASE_VERSION" ./chart chartmuseum
env:
CHART_MUSEUM_URL: "https://charts.devspace.sh/"
CHART_MUSEUM_USER: ${{ secrets.CHART_MUSEUM_USER }}
CHART_MUSEUM_PASSWORD: ${{ secrets.CHART_MUSEUM_PASSWORD }}