Skip to content

chore: bumping chart version #10

chore: bumping chart version

chore: bumping chart version #10

Workflow file for this run

name: ON_TAG_CREATE
on:
push:
tags:
- '*'
jobs:
docker_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ryaneorth/scheduled-volume-snapshotter
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
helm_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate Index
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
rm get_helm.sh
git fetch --tags
ALL_TAGS=($(git tag))
echo "apiVersion: v1" > repo/index.yaml
mkdir tmp_git
cd tmp_git
git clone https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter.git
cd k8s-scheduled-volume-snapshotter
for tag in "${ALL_TAGS[@]}"; do
git checkout "$tag"
CHART_VERSION=$(helm show chart helm/charts/scheduled-volume-snapshotter | grep version: | awk '{print $2}')
PACKAGE_LOC=$(helm package helm/charts/scheduled-volume-snapshotter --destination ../../repo | awk '{print $(NF)}')
mv "$PACKAGE_LOC" ../../repo/helm-chart.tgz
echo "Chart Version: $CHART_VERSION"
helm repo index ../../repo --url "https://github.com/ryaneorth/k8s-scheduled-volume-snapshotter/releases/download/${tag}" --merge ../../repo/index.yaml
rm ../../repo/helm-chart.tgz
done
cd ../.. && rm -rf tmp_git
CURRENT_CHART_VERSION=$(helm show chart helm/charts/scheduled-volume-snapshotter | grep version: | awk '{print $2}')
echo "CHART_VERSION=${CURRENT_CHART_VERSION}" >> $GITHUB_ENV
- name: Push index.yaml
run: |
git config --global user.name '${{ secrets.PRIMARY_USERNAME }}'
git config --global user.email '${{ secrets.PRIMARY_EMAIL }}'
git commit -am "Update helm repo index for release ${{ env.CHART_VERSION }}"
git push