ci: use env variable in branch created workflow (#44240)
This commit is contained in:
parent
0064b23440
commit
d3e368003b
1 changed files with 4 additions and 2 deletions
6
.github/workflows/branch-created.yml
vendored
6
.github/workflows/branch-created.yml
vendored
|
@ -23,11 +23,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Determine Major Version
|
- name: Determine Major Version
|
||||||
id: check-major-version
|
id: check-major-version
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ github.event.inputs.branch-name || github.event.ref }}
|
||||||
run: |
|
run: |
|
||||||
if [[ ${{ github.event.inputs.branch-name || github.event.ref }} =~ ^([0-9]+)-x-y$ ]]; then
|
if [[ "$BRANCH_NAME" =~ ^([0-9]+)-x-y$ ]]; then
|
||||||
echo "MAJOR=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
|
echo "MAJOR=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "Not a release branch: ${{ github.event.inputs.branch-name || github.event.ref }}"
|
echo "Not a release branch: $BRANCH_NAME"
|
||||||
fi
|
fi
|
||||||
- name: New Release Branch Tasks
|
- name: New Release Branch Tasks
|
||||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue