Skip to content

Commit 3752523

Browse files
authored
additional fix of checkout with custom commit sha #905 (#931)
1 parent ac6bd5d commit 3752523

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/build-and-run-tests-from-branch.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ jobs:
128128
git config --global --add safe.directory ${GITHUB_WORKSPACE}
129129
git fetch
130130
git checkout ${{ github.event.inputs.commit_sha }}
131-
- uses: actions/checkout@v3
132-
with:
133-
ref: ${{ env.COMMIT_SHA }}
134131
135132
- name: Run monitoring
136133
run: |

.github/workflows/publish-on-github-packages.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ jobs:
2727
- name: Print environment variables
2828
run: printenv
2929

30-
- uses: actions/checkout@v3
31-
with:
32-
ref: ${{ github.event.inputs.commit_sha }}
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
- name: Check out ${{ github.event.inputs.commit_sha }} commit
34+
if: github.event.inputs.commit_sha != ''
35+
run: |
36+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
37+
git fetch
38+
git checkout ${{ github.event.inputs.commit_sha }}
3339
3440
- uses: gradle/gradle-build-action@v2
3541
with:

0 commit comments

Comments
 (0)