From 2759f5f897f42ab218f9641ad61cbd4838dfd5a4 Mon Sep 17 00:00:00 2001 From: Nicholas openSUSE Software Engineer Date: Thu, 12 Dec 2024 15:37:12 -0300 Subject: [PATCH] [dev-v2.10] auto bump trigger (#4853) --- .github/workflows/auto-bump.yaml | 16 ++++++++-------- .github/workflows/test-trigger.yaml | 13 ++++++++----- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/auto-bump.yaml b/.github/workflows/auto-bump.yaml index 0fbb5b2b22..1bdd9832ad 100644 --- a/.github/workflows/auto-bump.yaml +++ b/.github/workflows/auto-bump.yaml @@ -17,22 +17,22 @@ jobs: - name: Log Event Payload run: | - echo "Raw Payload: ${{ github.event.inputs.payload }}" + echo "Raw Payload: ${{ github.event.inputs.eventPayload }}" - name: Parse JSON Payload id: parse_payload run: | - echo '${{ github.event.inputs.payload }}' | jq -r '.package, .branch' | { - read package + echo '${{ github.event.inputs.eventPayload }}' | jq -r '.chart, .branch' | { + read chart read branch - echo "PACKAGE=$package" >> $GITHUB_ENV + echo "CHART=$chart" >> $GITHUB_ENV echo "BRANCH=$branch" >> $GITHUB_ENV } - name: make chart-bump run: | - echo "make chart-bump package=${{ env.PACKAGE }} branch=${{ env.BRANCH }}" - make chart-bump package="${{ env.PACKAGE }}" branch="${{ env.BRANCH }}" + echo "make chart-bump package=${{ env.CHART }} branch=${{ env.BRANCH }}" + make chart-bump package="${{ env.CHART }}" branch="${{ env.BRANCH }}" - name: Configure Git for Commit run: | @@ -42,10 +42,10 @@ jobs: - name: Git Add, Commit, Push Changes run: | git add . - git commit -m "Auto bump chart version for ${PACKAGE}" + git commit -m "Auto bump chart version for ${env.CHART}" git push origin ${{ env.BRANCH }} - name: Create Pull Request run: | gh auth login --with-token < ${{ secrets.GITHUB_TOKEN }} - gh pr create --base ${{ env.BRANCH }} --head ${{ github.sha }} --title "[${env.BRANCH}] auto bump: ${PACKAGE}" --body "This PR auto-bumps the chart version for ${PACKAGE}" + gh pr create --base ${{ env.BRANCH }} --head ${{ github.sha }} --title "[${env.BRANCH}] auto bump: ${env.CHART}" --body "This PR auto-bumps the chart version for ${env.CHART}" diff --git a/.github/workflows/test-trigger.yaml b/.github/workflows/test-trigger.yaml index bc107a8008..f557abf309 100644 --- a/.github/workflows/test-trigger.yaml +++ b/.github/workflows/test-trigger.yaml @@ -3,15 +3,18 @@ name: trigger-test on: workflow_dispatch: inputs: - payload: - description: "Mock payload for testing" + chart: + description: "Chart name" required: true - default: '{"package": "example-chart", "branch": "main"}' + default: "example-chart" + branch: + description: "Branch name (only dev branches)" + required: true + default: "dev-v2.10" jobs: auto-bump: uses: ./.github/workflows/auto-bump.yaml with: - eventPayload: ${{ github.event.inputs.payload }} - + eventPayload: '{"chart": "${{ github.event.inputs.chart }}", "branch": "${{ github.event.inputs.branch }}"}'