From cbcfbaf4887b9ffca3e30e1abb03cf8acc9e2b98 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 11 Sep 2023 10:46:13 +0200 Subject: [PATCH] .github/workflow: remove automatic creation of pull request at github.com/VictoriaMetrics/ops repository on new tag This automation doesn't work as intended on LTS releases, bugfix releases and custom releases, since it assumes every new tag is related only to new release. Also the github.com/VictoriaMetrics/ops repository may contain manually set custom tags for VictoriaMetrics components (for example, for testing the latest bugfixes or features), which are overwritten by the generated pull request. The way to go is to manually update tags at github.com/VictoriaMetrics/ops repository when needed instead of trying to automate this process. --- .github/workflows/update-sandbox.yml | 80 ---------------------------- 1 file changed, 80 deletions(-) delete mode 100644 .github/workflows/update-sandbox.yml diff --git a/.github/workflows/update-sandbox.yml b/.github/workflows/update-sandbox.yml deleted file mode 100644 index 07f4fcc96..000000000 --- a/.github/workflows/update-sandbox.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: sandbox-release -on: - release: - types: [published] -permissions: - contents: write -jobs: - deploy-sandbox: - runs-on: ubuntu-latest - steps: - - name: check inputs - if: github.event.release.tag_name == '' - run: exit 1 - - - name: Check out code - uses: actions/checkout@v4 - with: - repository: VictoriaMetrics/ops - token: ${{ secrets.VM_BOT_GH_TOKEN }} - - - name: Import GPG key - id: import-gpg - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.VM_BOT_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - - - name: update image tag - uses: fjogeleit/yaml-update-action@main - with: - valueFile: 'gcp-test/sandbox/manifests/benchmark-vm/vmcluster.yaml' - commitChange: false - createPR: false - changes: | - { - "gcp-test/sandbox/manifests/benchmark-vm/vmcluster.yaml": { - "spec.vminsert.image.tag": "${{ github.event.release.tag_name }}-enterprise-cluster", - "spec.vmselect.image.tag": "${{ github.event.release.tag_name }}-enterprise-cluster", - "spec.vmstorage.image.tag": "${{ github.event.release.tag_name }}-enterprise-cluster" - }, - "gcp-test/sandbox/manifests/benchmark-vm/vmsingle.yaml": { - "spec.image.tag": "${{ github.event.release.tag_name }}-enterprise" - }, - "gcp-test/sandbox/manifests/monitoring/monitoring-vmagent.yaml": { - "spec.image.tag": "${{ github.event.release.tag_name }}" - }, - "gcp-test/sandbox/manifests/monitoring/monitoring-vmcluster.yaml": { - "spec.vminsert.image.tag": "${{ github.event.release.tag_name }}-enterprise-cluster", - "spec.vmselect.image.tag": "${{ github.event.release.tag_name }}-enterprise-cluster", - "spec.vmstorage.image.tag": "${{ github.event.release.tag_name }}-enterprise-cluster" - }, - "gcp-test/sandbox/manifests/monitoring/vmalert.yaml": { - "spec.image.tag": "${{ github.event.release.tag_name }}-enterprise" - } - } - - - name: commit changes - run: | - git config --global user.name "${{ steps.import-gpg.outputs.email }}" - git config --global user.email "${{ steps.import-gpg.outputs.email }}" - git add . - git commit -S -m "Deploy image tag ${RELEASE_TAG} to sandbox" - env: - RELEASE_TAG: ${{ github.event.release.tag_name }} - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - branch: release-automation - token: ${{ secrets.VM_BOT_GH_TOKEN }} - delete-branch: true - title: "release ${{ github.event.release.tag_name }}" - body: | - Release [${{ github.event.release.tag_name }}](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/${{ github.event.release.tag_name }}) to sandbox - - > Auto-generated by `Github Actions Bot` -