-
Notifications
You must be signed in to change notification settings - Fork 23
60 lines (59 loc) · 1.74 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
name: release
on:
push:
tags:
- "v*"
env:
VERSION: ${{ github.ref_name }}
IMAGE: quay.io/jetstack/cert-manager-approver-policy:${{ github.ref_name }}
jobs:
docker-image:
permissions:
contents: write
id-token: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le
push: true
tags: ${{ env.IMAGE }}
build-args: |
VERSION=${{ env.VERSION }}
github-release:
runs-on: ubuntu-22.04
needs:
- docker-image
steps:
- uses: actions/checkout@v4
- id: create_helm_archive
run: make helm-chart
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: true
prerelease: true
body: |
Docker Image: `${{ env.IMAGE }}`
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.create_helm_archive.outputs.path }}
asset_name: cert-manager-approver-policy.helm-chart.tgz
asset_content_type: application/gzip