chore(deps): update actions/checkout digest to a5ac7e5 #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Helm Repository | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
env: | |
MIX_ENV: prod | |
KUBECONFIG: /home/runner/.kube/config | |
HELM_DOCS_VERSION: 1.13.1 | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
publish_chart: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | |
- name: install helm-docs | |
run: | | |
cd /tmp | |
wget https://github.com/norwoodj/helm-docs/releases/download/v${{ env.HELM_DOCS_VERSION }}/helm-docs_${{ env.HELM_DOCS_VERSION }}_Linux_x86_64.tar.gz | |
tar -xvf helm-docs_${{ env.HELM_DOCS_VERSION }}_Linux_x86_64.tar.gz | |
sudo mv helm-docs /usr/local/sbin | |
- name: helm docs | |
run: | | |
cd priv/charts/kompost | |
helm-docs | |
- name: helm lint | |
run: | | |
helm lint priv/charts/kompost | |
- name: helm login | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io -u $ --password-stdin | |
- name: helm package | |
if: ${{ github.event_name != 'push' }} | |
run: helm package priv/charts/kompost | |
- name: helm package | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
echo "${{ secrets.CHART_SIGN_PRIVATE_KEY }}" | gpg --dearmor --output keyring.gpg | |
helm package --sign --key 'Michael Ruoss (Kompost Helm Package Signing)' --keyring keyring.gpg priv/charts/kompost | |
- name: helm push | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
helm push kompost-*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts | |
- name: Upload artifacthub-repo.yml | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | oras login ghcr.io -u mruoss --password-stdin | |
oras push \ | |
ghcr.io/${{ github.repository_owner }}/charts/kompost:artifacthub.io \ | |
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \ | |
priv/charts/kompost/artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml |