Skip to content

Commit 18b399d

Browse files
committed
checkout git repo before any step
1 parent 518d3e7 commit 18b399d

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/build-rc-auto.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ jobs:
4040
# remove before merge
4141
echo "semver=7.99.999" >> "$GITHUB_OUTPUT"
4242
# Validate branch matches release/x.y.z format (semantic versioning)
43-
# if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
44-
# VERSION="${BRANCH_NAME#release/}"
45-
# echo "Valid release branch detected: $BRANCH_NAME (version: $VERSION)"
46-
# echo "semver=$VERSION" >> "$GITHUB_OUTPUT"
47-
# else
48-
# echo "Branch '$BRANCH_NAME' does not match release/x.y.z pattern. Skipping."
49-
# echo "semver=" >> "$GITHUB_OUTPUT"
50-
# exit 1
51-
# fi
43+
# if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
44+
# VERSION="${BRANCH_NAME#release/}"
45+
# echo "Valid release branch detected: $BRANCH_NAME (version: $VERSION)"
46+
# echo "semver=$VERSION" >> "$GITHUB_OUTPUT"
47+
# else
48+
# echo "Branch '$BRANCH_NAME' does not match release/x.y.z pattern. Skipping."
49+
# echo "semver=" >> "$GITHUB_OUTPUT"
50+
# exit 1
51+
# fi
5252

5353
- name: Find PR and check for auto-rc-builds label
5454
id: check-label
@@ -114,6 +114,11 @@ jobs:
114114
- bump-version
115115
if: needs.validate-and-check-label.outputs.has-label == 'true'
116116
steps:
117+
- name: Checkout repository
118+
uses: actions/checkout@v3
119+
with:
120+
fetch-depth: 0
121+
ref: ${{ github.ref }}
117122
- name: Trigger RC Build
118123
env:
119124
SEMVER: ${{ needs.validate-and-check-label.outputs.semver }}

.github/workflows/build-rc-create.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ jobs:
4343
- generate-build-version
4444
- bump-version
4545
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v3
48+
with:
49+
fetch-depth: 0
50+
ref: release/${{ inputs.semver }}
4651
- name: Trigger RC Build
4752
env:
4853
SEMVER: ${{ inputs.semver }}

0 commit comments

Comments
 (0)