44 push :
55 branches :
66 - main
7+ - feature/FAC-158_update-artifacthub-status
78
89jobs :
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- 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
0 commit comments