Skip to content

Release v0.12.38 (#4039) #1320

Release v0.12.38 (#4039)

Release v0.12.38 (#4039) #1320

name: Publish OCI Charts
on:
pull_request:
paths:
- "charts/**"
- ".github/workflows/oci-charts-ghcr.yaml"
push:
branches:
- master
paths:
- "charts/**"
permissions:
contents: read
packages: write
jobs:
publish-test:
name: Publish test charts
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: console
dir: charts/console
repository: pluralsh/test-charts
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: azure/setup-helm@v4
- name: Add repos
run: |
helm repo add vmware https://vmware-tanzu.github.io/helm-charts
helm repo add radar https://radar-base.github.io/radar-helm-charts
helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts
helm repo add dexidp https://charts.dexidp.io
- name: Push chart (0.0.0+pr-<number>)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
uses: appany/helm-oci-chart-releaser@v0.5.0
with:
name: ${{ matrix.name }}
repository: ${{ matrix.repository }}
tag: 0.0.0+test
path: ${{ matrix.dir }}
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: "true"
publish:
name: Publish charts
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: console
dir: charts/console
repository: pluralsh/charts
- name: controller
dir: charts/controller
repository: pluralsh/controller-chart
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: azure/setup-helm@v4
- name: Add repos
run: |
helm repo add vmware https://vmware-tanzu.github.io/helm-charts
helm repo add radar https://radar-base.github.io/radar-helm-charts
helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts
helm repo add dexidp https://charts.dexidp.io
- name: PR tag values
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
id: pr_tags
run: |
echo "pr_tag=0.0.0+pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
echo "sha_tag=0.0.0+sha-${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"
- name: Push chart (0.0.0+pr-<number>)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
uses: appany/helm-oci-chart-releaser@v0.5.0
with:
name: ${{ matrix.name }}
repository: ${{ matrix.repository }}
tag: ${{ steps.pr_tags.outputs.pr_tag }}
path: ${{ matrix.dir }}
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: "true"
- name: Push chart (0.0.0+sha-<sha>)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
uses: appany/helm-oci-chart-releaser@v0.5.0
with:
name: ${{ matrix.name }}
repository: ${{ matrix.repository }}
tag: ${{ steps.pr_tags.outputs.sha_tag }}
path: ${{ matrix.dir }}
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: "true"
- name: Chart version
if: ${{ github.ref == 'refs/heads/master' }}
id: chart_version
run: |
set -euo pipefail
version=$(awk -F': *' '/^version:/ {print $2; exit}' "${{ matrix.dir }}/Chart.yaml")
if [ -z "$version" ]; then
echo "Missing version in ${{ matrix.dir }}/Chart.yaml" >&2
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Push chart (${{ steps.chart_version.outputs.version }})
if: ${{ github.ref == 'refs/heads/master' }}
uses: appany/helm-oci-chart-releaser@v0.5.0
with:
name: ${{ matrix.name }}
repository: ${{ matrix.repository }}
tag: ${{ steps.chart_version.outputs.version }}
path: ${{ matrix.dir }}
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: "true"
- name: Push chart (${{ steps.chart_version.outputs.version }}+latest)
if: ${{ github.ref == 'refs/heads/master' }}
uses: appany/helm-oci-chart-releaser@v0.5.0
with:
name: ${{ matrix.name }}
repository: ${{ matrix.repository }}
tag: ${{ steps.chart_version.outputs.version }}+latest
path: ${{ matrix.dir }}
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: "true"