Skip to content

v0.47.0

v0.47.0 #12

Workflow file for this run

name: Update CRDs for chart repo
on:
release:
types: [published]
jobs:
update-crds:
if: "!contains(github.event.release.tag_name, '-rc')"
runs-on: ubuntu-latest
environment:
name: docs
steps:
- name: Check out operator code
uses: actions/checkout@v4
with:
repository: VictoriaMetrics/operator
ref: master
token: ${{ secrets.VM_BOT_GH_TOKEN }}
path: __vm-operator-repo
- name: Check out VM code
uses: actions/checkout@v4
with:
repository: VictoriaMetrics/helm-charts
ref: master
token: ${{ secrets.VM_BOT_GH_TOKEN }}
path: __vm-charts-repo
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.VM_BOT_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
workdir: __vm-charts-repo
- name: Update crd yaml in chart repo
run: |
cp ../__vm-operator-repo/config/crd/overlay/crd.yaml charts/victoria-metrics-operator/crd.yaml
cp ../__vm-operator-repo/config/crd/overlay/crd.yaml charts/victoria-metrics-k8s-stack/charts/crds/crds/crd.yaml
echo "BUILDTIME=$(date +%s)" >> $GITHUB_OUTPUT
echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT
working-directory: __vm-charts-repo
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
add-paths: charts
commit-message: Automatic update operator crds from ${{ github.repository }}@${{ steps.update.outputs.SHORT_SHA }}
signoff: true
author: Github Actions <[email protected]>
path: __vm-charts-repo
branch: operator-crd-update-${{ steps.update.outputs.BUILDTIME }}
token: ${{ secrets.VM_BOT_GH_TOKEN }}
delete-branch: true
title: Automatic update operator crds from ${{ github.repository }}@${{ steps.update.outputs.SHORT_SHA }}