Skip to content

Commit 095052b

Browse files
author
mmahipal
committed
changed Github actions to use branch name as tag
1 parent e0bcc02 commit 095052b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/github-actions.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,12 @@ jobs:
3838
# extract branch name
3939
- name: Extract branch name
4040
if: github.event_name != 'pull_request'
41-
run: echo "BRANCH_NAME ${GITHUB_REF#refs/heads/}"
42-
env:
43-
BRANCH_NAME: ${GITHUB_REF#refs/heads/}
41+
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> "$GITHUB_ENV"
4442

4543
# extract branch name on pull request
4644
- name: Extract branch name
4745
if: github.event_name == 'pull_request'
48-
run: echo "BRANCH_NAME ${GITHUB_HEAD_REF}"
49-
env:
50-
BRANCH_NAME: ${GITHUB_HEAD_REF}
46+
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> "$GITHUB_ENV"
5147

5248
# Build and push Operator image (don't push on PR)
5349
- name: Build and push Docker image

0 commit comments

Comments
 (0)