Merge pull request #55 from chgl/publish-as-an-oci-artifact

Push the helm charts to ghcr.io as an OCI artifact
This commit is contained in:
0xThresh 2024-07-30 22:37:06 -06:00 committed by GitHub
commit 803c99e135
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,7 @@ jobs:
release:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
@ -23,11 +24,6 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Add Dependency Repos
run: |
helm repo add ollama https://otwld.github.io/ollama-helm/
@ -41,3 +37,19 @@ jobs:
charts_dir: charts/
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Login to GitHub Container Registry
run: |
echo "${GHCR_REGISTRY_PASSWORD}" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
env:
GHCR_REGISTRY_PASSWORD: "${{ secrets.GITHUB_TOKEN }}"
- name: Push Charts to ghcr.io
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
echo "No charts to release"
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}
done