Skip to content

Commit

Permalink
ci: use env variable in branch created workflow (electron#44240)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 authored and yangannyx committed Oct 21, 2024
1 parent 003433f commit 4a582d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/branch-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ jobs:
steps:
- name: Determine Major Version
id: check-major-version
env:
BRANCH_NAME: ${{ github.event.inputs.branch-name || github.event.ref }}
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"
else
echo "Not a release branch: ${{ github.event.inputs.branch-name || github.event.ref }}"
echo "Not a release branch: $BRANCH_NAME"
fi
- name: New Release Branch Tasks
if: ${{ steps.check-major-version.outputs.MAJOR }}
Expand Down

0 comments on commit 4a582d3

Please sign in to comment.