Skip to content

Commit 752c5f0

Browse files
authored
Replace github.event usage with env variables (#648)
Replace direct github.event usage with top-level env variables.
1 parent e5b7aa8 commit 752c5f0

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/post_release_version_bump.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929

3030
- name: Extract Major.Minor Version and setup Env variable
3131
run: |
32-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
33-
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
32+
echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
3433
3534
- name: Get current major.minor version from main branch
3635
id: get_version
@@ -87,8 +86,7 @@ jobs:
8786
8887
- name: Extract Major.Minor Version and setup Env variable
8988
run: |
90-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
91-
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
89+
echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
9290
9391
- name: Determine release branch and checkout
9492
run: |

.github/workflows/pre_release_prepare.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ jobs:
5454
5555
- name: Extract Major.Minor Version and setup Env variable
5656
run: |
57-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
58-
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
57+
echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
5958
6059
- name: Create branches
6160
run: |

0 commit comments

Comments
 (0)