-
Notifications
You must be signed in to change notification settings - Fork 29
46 lines (40 loc) · 1.5 KB
/
docker-build.yml
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
name: Publish helm chart
on:
push:
tags: "*"
branches: ["main"]
jobs:
publish-scan:
name: Build scan image
runs-on: [ubuntu-20.04]
if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@v3
- name: Docker login for ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Set image tag for release
id: tag-name
run: echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- run: docker build -t ghcr.io/kubewharf/kelemetry-scan:${{steps.tag-name.outputs.IMAGE_TAG}} scan
- run: docker push ghcr.io/kubewharf/kelemetry-scan:${{steps.tag-name.outputs.IMAGE_TAG}}
publish-chart:
name: Build helm chart
runs-on: [ubuntu-20.04]
if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@v3
- name: Docker login for ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Set image tag for release
id: tag-name
run: echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- run: helm package charts/kelemetry --app-version="${{steps.tag-name.outputs.IMAGE_TAG}}" --version="${{steps.tag-name.outputs.IMAGE_TAG}}" -d output
- run: helm push output/kelemetry-chart-${{steps.tag-name.outputs.IMAGE_TAG}}.tgz oci://ghcr.io/kubewharf