Skip to content

fixed #2325 - missing package.lock resolutions & integrity #1803

fixed #2325 - missing package.lock resolutions & integrity

fixed #2325 - missing package.lock resolutions & integrity #1803

Workflow file for this run

name: Helm
permissions: read-all
on:
push:
branches: [ '**' ]
tags: [ 'chart-v*.*.*' ]
pull_request:
branches: [ '**' ]
env:
REGISTRY: ghcr.io
CHART_NAME: warpgate
CHART_PATH: helm/warpgate
OCI_REPO: oci://ghcr.io/warp-tech/helm-charts
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Set up Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5
- name: Lint chart
run: helm lint ${{ env.CHART_PATH }} --strict
- name: Template render test
run: helm template ${{ env.CHART_NAME }} ${{ env.CHART_PATH }} --debug > /dev/null
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/chart-v')
needs: lint
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Set up Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5
- name: Extract version from tag
id: version
run: |
# chart-v0.0.1 -> 0.0.1
VERSION="${GITHUB_REF_NAME#chart-v}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Chart version: ${VERSION}"
- name: Update Chart.yaml version
run: |
sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" ${{ env.CHART_PATH }}/Chart.yaml
echo "--- Chart.yaml ---"
cat ${{ env.CHART_PATH }}/Chart.yaml
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Package chart
run: helm package ${{ env.CHART_PATH }} --destination ${{ runner.temp }}
- name: Push chart to GHCR
run: helm push ${{ runner.temp }}/${{ env.CHART_NAME }}-${{ steps.version.outputs.version }}.tgz ${{ env.OCI_REPO }}
- name: Verify pushed chart
run: helm show chart ${{ env.OCI_REPO }}/${{ env.CHART_NAME }} --version ${{ steps.version.outputs.version }}