Switch Docker CI from gitlab to github
Adds buildx signing and helm chart publication. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
46
.github/workflows/helm.yml
vendored
Normal file
46
.github/workflows/helm.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# release.yaml
|
||||
name: Release Charts
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
# Optional step if GPG signing is used
|
||||
- name: Prepare GPG key
|
||||
run: |
|
||||
gpg_dir=.cr-gpg
|
||||
mkdir "$gpg_dir"
|
||||
keyring="$gpg_dir/secring.gpg"
|
||||
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring"
|
||||
passphrase_file="$gpg_dir/passphrase"
|
||||
echo "$GPG_PASSPHRASE" > "$passphrase_file"
|
||||
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
|
||||
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
|
||||
echo "sign: true" > cr.yaml
|
||||
echo "key: Smarter Project" >> cr.yaml
|
||||
env:
|
||||
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}"
|
||||
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.4.1
|
||||
with:
|
||||
config: cr.yaml
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
Reference in New Issue
Block a user