v0.50.0 #24
Workflow file for this run
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
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 | |
id: import-gpg | |
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 | |
id: update | |
run: | | |
cp ../__vm-operator-repo/config/crd/overlay/crd.yaml charts/victoria-metrics-operator/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 | |
committer: "Github Actions <${{ steps.import-gpg.outputs.email }}>" | |
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 }} |