helm-release.yaml•1.57 kB
name: Update Helm on PR Merge
on:
pull_request:
types: [closed]
branches:
- main
jobs:
check-and-push-helm:
name: Check PR and Push Helm
permissions:
contents: read
# Only run if the PR was merged and matches our pattern
if: |
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'update-phoenix-version-')
runs-on: ubuntu-latest
env:
REGISTRY: arizephoenix
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 'latest'
- name: Add Helm repositories
run: |
helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/
helm repo update
- name: Package Helm chart
run: |
helm dependency build helm/
helm package ./helm
- name: Push Helm chart to Docker Hub
run: |
# Push the chart to Docker Hub as an OCI artifact
helm push phoenix-helm-*.tgz oci://registry-1.docker.io/${{ env.REGISTRY }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.REGISTRY }}/phoenix-helm
readme-filepath: ./helm/README.md