-
Notifications
You must be signed in to change notification settings - Fork 236
71 lines (68 loc) · 2.27 KB
/
release.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
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
name: Release
on:
push:
tags:
- "v*"
permissions: read-all
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Login to AWS Public ECR
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Setup Syft
uses: anchore/sbom-action/download-syft@v0
- name: Release Docker images and CLI tool binaries
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GHT_RELEASE }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Checkout Helm charts repo
uses: actions/checkout@v4
with:
repository: artifacthub/helm-charts
path: helm-charts
token: ${{ secrets.GHT_RELEASE }}
- name: Extract tag name
id: extract_tag_name
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Release Helm chart
run: |
mkdir tmp && cd tmp
helm package -u ../charts/artifact-hub
helm repo index --merge ../helm-charts/index.yaml --url https://artifacthub.github.io/helm-charts .
mv * ../helm-charts
cd ../helm-charts
git config user.name artifacthubio
git config user.email hub@artifacthub.io
git add .
git commit -m "Add Artifact Hub chart package ${{steps.extract_tag_name.outputs.tag}}"
git push