Skip to content

Commit 4a6e260

Browse files
ARCH-1916 - Add checkout to increment version (since it uses itself)
1 parent 2ea06b7 commit 4a6e260

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/increment-version-on-merge.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ on:
2929
# if this action should be incremented and if new tags should be pushed to the repo based
3030
# on the same criteria used in the build-and-review-pr.yml workflow.
3131

32-
3332
jobs:
3433
increment-version:
3534
runs-on: ubuntu-latest
@@ -59,6 +58,10 @@ jobs:
5958
console.log(`PR is merged to ${defaultBranch}. Proceed with subsequent steps.`);
6059
core.exportVariable('MERGE_TO_MAIN', true);
6160
61+
- name: Checkout
62+
if: env.MERGE_TO_MAIN == 'true'
63+
uses: actions/checkout@v3
64+
6265
- name: If PR is merged to main - Check for code changes to the action source code
6366
if: env.MERGE_TO_MAIN == 'true'
6467
id: source-code
@@ -88,7 +91,7 @@ jobs:
8891
if: env.MERGE_TO_MAIN == 'true' && steps.source-code.outputs.HAS_CHANGES == 'true'
8992
id: version
9093
uses: ./
91-
94+
9295
- name: If PR is merged to main & PR has source code changes - Print action version (${{ steps.version.outputs.NEXT_VERSION || 'N/A'}})
9396
if: env.MERGE_TO_MAIN == 'true' && steps.source-code.outputs.HAS_CHANGES == 'true'
9497
run: echo "The next action version will be - ${{ steps.version.outputs.NEXT_VERSION }}"

0 commit comments

Comments
 (0)