-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (68 loc) · 2.18 KB
/
tag.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
---
name: tag
on:
push:
tags:
- "v*"
jobs:
image:
name: image
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: registry login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: shipwright-io
password: ${{ secrets.GITHUB_TOKEN }}
- name: extract current tag
id: get_tag
run: echo ::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)
- name: build image and push
uses: docker/build-push-action@v2
with:
push: true
build-args:
version=${{ steps.get_tag.outputs.tag }}
context: ./
file: ./Containerfile
tags: ghcr.io/shipwright-io/imgctrl:${{ steps.get_tag.outputs.tag }}
release:
name: release
needs:
- image
runs-on: ubuntu-latest
container:
image: quay.io/tagger/actions-image:latest
steps:
- name: checkout source code
uses: actions/checkout@v2
- name: extract current tag
id: get_tag
run: echo ::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)
- name: build linux plugin
run: VERSION=${{ steps.get_tag.outputs.tag }} make kubectl-image
- name: compress linux plugin
run: tar -C output/bin -czvf kubectl-image-linux-amd64.tgz kubectl-image
- name: build darwin plugin
run: VERSION=${{ steps.get_tag.outputs.tag }} make kubectl-image-darwin
- name: compress darwin plugin
run: tar -C output/bin -czvf kubectl-image-darwin-amd64.tgz kubectl-image
- name: setting image tag in values.yaml
run: sed -i 's/latest/${{ steps.get_tag.outputs.tag }}/g' chart/values.yaml
- name: setting version in chart.yaml
run: sed -i 's/v0.0.0/${{ steps.get_tag.outputs.tag }}/g' chart/Chart.yaml
- name: build helm chart release
run: helm package chart/
- name: build readme pdf
run: make pdf
- name: publish release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
*.tgz
output/doc/README.pdf