Skip to content

Commit 2300e96

Browse files
committed
update workflow for artifacthub package signing
1 parent b35e134 commit 2300e96

File tree

5 files changed

+67
-24
lines changed

5 files changed

+67
-24
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- feature/FAC-158_update-artifacthub-status
78

89
jobs:
910
release:
@@ -19,31 +20,57 @@ jobs:
1920
git config user.name "$GITHUB_ACTOR"
2021
git config user.email "[email protected]"
2122
22-
- name: Prepare GPG Key
23+
- name: Install Helm
24+
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5
25+
with:
26+
version: v3.8.1
27+
28+
- name: Prepare GPG key # This step is for using exported keys and make your github runner
2329
run: |
24-
echo "# Import the GPG Key"
25-
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
30+
# Create a folder to store files
31+
gpg_dir=.cr-gpg
32+
mkdir "$gpg_dir"
33+
34+
# Refer keyring to private key of gpg
35+
keyring="$gpg_dir/secring.gpg"
36+
37+
# Store base64 GPG key into keyring
38+
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring"
39+
40+
# Store passphrase data into a file
41+
passphrase_file="$gpg_dir/passphrase"
42+
echo "$GPG_PASSPHRASE" > "$passphrase_file"
2643
27-
echo "Create passphrase file"
28-
echo "${{ secrets.GPG_PASSPHRASE }}" > passphrase.txt
44+
# Save passphrase into github-environment
45+
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
2946
30-
echo "Store the GPG key ID to a file"
31-
GPG_KEY_ID=$(gpg --list-secret-keys --with-colons | grep 'sec' | cut -d: -f5)
32-
echo "$GPG_KEY_ID" > gpg_key_id.txt
47+
# Save private key into github-environemnt
48+
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
3349
env:
34-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
35-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
50+
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}" # Refer secrets of github above
51+
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
3652

37-
- name: Create .cr.yaml
53+
- name: Add repositories
3854
run: |
39-
cat <<EOF > .cr.yaml
40-
sign: true
41-
# Read the key from the file.
42-
key: "$(cat gpg_key_id.txt)"
43-
passphrase-file: "passphrase.txt"
44-
EOF
45-
46-
- name: Run chart-releaser
47-
uses: helm/[email protected]
55+
for dir in $(ls -d charts/*/); do
56+
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
57+
done
58+
59+
- name: Run chart-releaser #this is used to generate new version of helm chart along with some file with extension .prov
60+
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 #v1.6.0
4861
env:
4962
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
63+
CR_KEY: "${{ secrets.CR_KEY }}" # Key name used while creating key
64+
CR_SIGN: true # Set to true to sign images
65+
66+
linter-artifacthub:
67+
runs-on: ubuntu-latest
68+
container:
69+
image: artifacthub/ah
70+
options: --user 1001
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@master
74+
- name: Run ah lint
75+
working-directory: ./charts/fission-all
76+
run: ah lint

charts/flex-ce/Chart.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: flex-ce
33
description: Run Flex for Apache Flink Community Edition in Kubernetes
44
type: application
5-
version: 1.0.63
5+
version: 1.0.64
66
appVersion: "94.2"
77
keywords:
88
- flink
@@ -15,3 +15,7 @@ sources:
1515
maintainers:
1616
- name: "Factor House Support"
1717
18+
annotations:
19+
artifacthub.io/signKey: |
20+
fingerprint: 9686853629F9810E63A72373BA3D0FAE1A26981F
21+
url: https://keybase.io/factorhouse/pgp_keys.asc

charts/flex/Chart.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: flex
33
description: Run Flex for Apache Flink in Kubernetes
44
type: application
5-
version: 1.0.63
5+
version: 1.0.64
66
appVersion: "94.2"
77
keywords:
88
- flink
@@ -15,3 +15,7 @@ sources:
1515
maintainers:
1616
- name: "Factor House Support"
1717
18+
annotations:
19+
artifacthub.io/signKey: |
20+
fingerprint: 9686853629F9810E63A72373BA3D0FAE1A26981F
21+
url: https://keybase.io/factorhouse/pgp_keys.asc

charts/kpow-ce/Chart.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: kpow-ce
33
description: Run Kpow for Apache Kafka Community Edition in Kubernetes
44
type: application
5-
version: 1.0.63
5+
version: 1.0.64
66
appVersion: "94.2"
77
keywords:
88
- kafka
@@ -18,3 +18,7 @@ sources:
1818
maintainers:
1919
- name: "Factor House Support"
2020
21+
annotations:
22+
artifacthub.io/signKey: |
23+
fingerprint: 9686853629F9810E63A72373BA3D0FAE1A26981F
24+
url: https://keybase.io/factorhouse/pgp_keys.asc

charts/kpow/Chart.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: kpow
33
description: Run Kpow for Apache Kafka in Kubernetes
44
type: application
5-
version: 1.0.63
5+
version: 1.0.64
66
appVersion: "94.2"
77
keywords:
88
- kafka
@@ -18,3 +18,7 @@ sources:
1818
maintainers:
1919
- name: "Factor House Support"
2020
21+
annotations:
22+
artifacthub.io/signKey: |
23+
fingerprint: 9686853629F9810E63A72373BA3D0FAE1A26981F
24+
url: https://keybase.io/factorhouse/pgp_keys.asc

0 commit comments

Comments
 (0)