Skip to content

chore(mumbledj): update ghcr.io/juniorjpdj/mumbledj:latest docker digest to fdcebff #739

chore(mumbledj): update ghcr.io/juniorjpdj/mumbledj:latest docker digest to fdcebff

chore(mumbledj): update ghcr.io/juniorjpdj/mumbledj:latest docker digest to fdcebff #739

name: Helm Chart build and OCI publish
on:
push:
branches:
- 'master'
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
list_charts:
name: List Helm Charts to build
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.MATRIX }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- name: Generate Helm Charts list
id: set-matrix
working-directory: charts
run: |
GIT_DIFF_ENABLED=0
if [ '${{ github.event_name }}' = 'push' ] ; then
GIT_DIFF_ENABLED=1
GIT_DIFF_BASE='${{ github.event.before }}'
GIT_DIFF_HEAD='${{ github.event.after }}'
elif [ '${{ github.event_name }}' = 'pull_request' ] ; then
GIT_DIFF_ENABLED=1
GIT_DIFF_BASE='${{ github.event.pull_request.base.sha }}'
GIT_DIFF_HEAD='${{ github.event.pull_request.head.sha }}'
fi
{
echo "MATRIX<<9743a66f914cc249efca164485a19c5c"
{
NO_CHARTS=1
for d in * ; do
# check if directory changed and skip if not
[ $GIT_DIFF_ENABLED = 1 ] && \
git diff -s --exit-code "${GIT_DIFF_BASE}..${GIT_DIFF_HEAD}" -- "$d" && \
continue
if [ -f "$d/Chart.yaml" ] ; then
echo "- chart: \"$d\""
NO_CHARTS=0
fi
done
[ $NO_CHARTS = 1 ] && echo '[]'
} | yq -p yaml -o json -I 0 .
echo 9743a66f914cc249efca164485a19c5c
} >> "$GITHUB_OUTPUT"
build:
name: "Build Helm Chart: ${{ matrix.chart }}"
runs-on: ubuntu-latest
needs: list_charts
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
if: needs.list_charts.outputs.matrix != '[]'
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.list_charts.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Generate properties
id: props
run: |
yq 'omit(["annotations"])' "charts/${{ matrix.chart }}/Chart.yaml" -o shell >> "$GITHUB_OUTPUT"
if [[ '${{ github.event_name }}' = 'pull_request' ]] ; then
echo "tag=0.0.0+pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
else
echo "tag=$(yq '.version' 'charts/${{ matrix.chart }}/Chart.yaml')" >> "$GITHUB_OUTPUT"
fi
- name: Release Helm Chart
uses: appany/helm-oci-chart-releaser@dd0551c15abe174eb57824ecde62e976091094da # v0.4.2
with:
name: ${{ matrix.chart }}
repository: juniorjpdj/charts
tag: ${{ steps.props.outputs.tag }}
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
update_dependencies: true