Skip to content

Commit 01aad11

Browse files
authored
Fix GitHub-Action Generate PR descriptions (#11129)
When `update-docs-version` ran, it created this PR - #11110: > Update docs version to ${GITHUB_REF##*/} Update docs version to ${GITHUB_REF##*/} The branch name was not expanded in the PR description, it uses Bash syntax not applicable outside of a `run` block Fixed by replacing Bash expansion to derive the branch name with the _actual_ branch name.
1 parent a3a44dd commit 01aad11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/update-docs-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
ref: main
2121
- name: Update latest_version property in mkdocs.yml
2222
run: |
23-
sed -i "s/latest_version: .*/latest_version: ${GITHUB_REF##*/}/g" mkdocs.yml
23+
sed -i "s/latest_version: .*/latest_version: ${GITHUB_REF_NAME}/g" mkdocs.yml
2424
git diff
2525
- name: Create Pull Request
2626
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v3.10.1
2727
with:
28-
title: Update docs version to ${GITHUB_REF##*/}
28+
title: Update docs version to ${{ github.ref_name }}
2929
body: |
30-
Update docs version to ${GITHUB_REF##*/}
30+
Update docs version to ${{ github.ref_name }}
3131
skip-checks: true
3232
branch: update-docs-version
3333
delete-branch: true

.github/workflows/update-testcontainers-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
ref: main
2121
- name: Update testcontainers.version property in gradle.properties
2222
run: |
23-
sed -i "s/^testcontainers\.version=.*/testcontainers\.version=${GITHUB_REF##*/}/g" gradle.properties
23+
sed -i "s/^testcontainers\.version=.*/testcontainers\.version=${GITHUB_REF_NAME}/g" gradle.properties
2424
git diff
2525
- name: Create Pull Request
2626
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v3.10.1
2727
with:
28-
title: Update testcontainers version to ${GITHUB_REF##*/}
28+
title: Update testcontainers version to ${{ github.ref_name }}
2929
body: |
30-
Update testcontainers version to ${GITHUB_REF##*/}
30+
Update testcontainers version to ${{ github.ref_name }}
3131
branch: update-tc-version
3232
delete-branch: true

0 commit comments

Comments
 (0)