From 450cc4afc6950e4ef2a71a03ea11a3c5a524e258 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Thu, 11 Apr 2024 14:15:02 +0900 Subject: [PATCH] ci: simplify version bump dispatch --- .github/workflows/version_bump.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 00ad344238..9eb7d8f622 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -7,12 +7,7 @@ concurrency: group: "version-bump-${{ github.ref_name }}" on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to run version bump on' - required: true - default: 'alpha' + workflow_dispatch: {} env: RELEASE_PLZ_BIN_URL: https://github.com/MarcoIeni/release-plz/releases/download/release-plz-v0.3.43/release-plz-x86_64-unknown-linux-gnu.tar.gz @@ -30,8 +25,7 @@ jobs: with: fetch-depth: "0" token: ${{ secrets.VERSION_BUMP_COMMIT_PAT }} - # For workflow_dispatch, use the input branch. Otherwise, use the triggering ref. - ref: ${{ github.event.inputs.branch || github.ref_name }} + ref: ${{ github.ref_name }} - name: Get the SHA of the last release commit id: get-sha @@ -48,11 +42,11 @@ jobs: repository-name: ${{ github.repository }} repository-owner: ${{ github.repository_owner }} head-sha: ${{ env.sha }} - base-branch: ${{ github.event.inputs.branch || github.ref_name }} + base-branch: ${{ github.ref_name }} polling-interval: 60 - name: Fetch the latest code from the specified branch - run: git pull origin ${{ github.event.inputs.branch || github.ref_name }} + run: git pull origin ${{ github.ref_name }} - uses: actions-rs/toolchain@v1 with: @@ -79,12 +73,12 @@ jobs: sudo mv release-plz /usr/local/bin - shell: bash # run as the branch name - run: ./resources/scripts/bump_version.sh ${{ github.event.inputs.branch || github.ref_name }} + run: ./resources/scripts/bump_version.sh ${{ github.ref_name }} - name: push version bump commit uses: ad-m/github-push-action@master with: github_token: ${{ secrets.VERSION_BUMP_COMMIT_PAT }} - branch: ${{ github.event.inputs.branch || github.ref_name }} + branch: ${{ github.ref_name }} tags: true - name: post notification to slack on failure if: ${{ failure() }}