fix: ai-service container build #3
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: package-helm-chart | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'charts/**' | |
workflow_dispatch: | |
jobs: | |
package-helm-chart: | |
permissions: | |
contents: read | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set environment variables | |
id: set-variables | |
run: | | |
echo "REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" | |
echo "VERSION=$(yq -r .version ./charts/aks-store-demo/Chart.yaml)" >> "$GITHUB_OUTPUT" | |
- name: Env variable output | |
id: test-variables | |
run: | | |
echo ${{ steps.set-variables.outputs.REPOSITORY }} | |
echo ${{ steps.set-variables.outputs.VERSION }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Package and push helm chart | |
run: | | |
helm package ./charts/aks-store-demo --version ${{ steps.set-variables.outputs.VERSION }} | |
helm push ./aks-store-demo-chart-${{ steps.set-variables.outputs.VERSION }}.tgz oci://${{ steps.set-variables.outputs.REPOSITORY }}/charts | |
publish-helm-chart: | |
permissions: | |
id-token: write | |
packages: write | |
contents: write | |
actions: read | |
deployments: read | |
pull-requests: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Publish Helm chart to GitHub Pages | |
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 # v1.7.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
linting: off |