chore(deps): bump sigs.k8s.io/controller-runtime in the k8s group #193
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
# This action releases the runtime-class-manager helm chart | |
# | |
# A chart is published to the configured OCI registry on every push to main | |
# as well as on semver tag releases (via workflow_call from release.yml). | |
name: Release helm chart | |
on: | |
push: | |
branches: | |
- main | |
workflow_call: | |
permissions: | |
contents: read | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
CHART_NAME: runtime-class-manager | |
jobs: | |
release: | |
name: Release chart | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install helm | |
uses: Azure/setup-helm@v4 | |
with: | |
version: v3.16.3 | |
- name: Determine chart version | |
run: | | |
if [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]]; then | |
# NOTE: We remove the leading 'v' to comply with helm's versioning requirements | |
echo "CHART_VERSION=$(echo -n ${{ github.ref_name }} | sed -rn 's/(v)?(.*)/\2/p')" >> $GITHUB_ENV | |
echo "APP_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
else | |
# NOTE: We can replace 0.0.0 with e.g. $(git describe --tags $(git rev-list --tags --max-count=1)) once we have a first tag | |
# However, we'll also need to update the checkout step with 'fetch-depth: 0' if we list tags | |
echo "CHART_VERSION=0.0.0-$(date +%Y%m%d-%H%M%S)-g$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
# Setting to 'latest' to match tag used in container-image.yml | |
echo "APP_VERSION=latest" >> $GITHUB_ENV | |
fi | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package chart | |
run: make helm-package | |
- name: Lint packaged chart | |
run: make helm-lint | |
- name: Upload chart as GitHub artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.CHART_NAME }} | |
path: _dist/${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz | |
- name: Publish chart | |
env: | |
CHART_REGISTRY: ${{ env.REGISTRY }}/${{ github.repository_owner }}/charts | |
run: | | |
make helm-publish | |
echo '### Helm chart published:' >> $GITHUB_STEP_SUMMARY | |
echo '- `Reference: ${{ env.CHART_REGISTRY }}/${{ env.CHART_NAME }}`' >> $GITHUB_STEP_SUMMARY | |
echo '- `Version: ${{ env.CHART_VERSION }}`' >> $GITHUB_STEP_SUMMARY |