Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

Commit 98277c1

Browse files
authored
Merge pull request #400 from mareklibra/latest.for.master.only
Do not tag :latest for non-master branches
2 parents b47c959 + 4249ef8 commit 98277c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: .github/workflows/mergeToSelectedBranches.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ jobs:
1616
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
1717
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
1818
echo "REACT_APP_GIT_SHA=${{ github.sha }}" >> $GITHUB_ENV
19-
echo "IMAGE_TAGS=latest,${{ github.sha }},${GITHUB_REF#refs/heads/}-${{ github.sha }}" >> $GITHUB_ENV
2019
echo "REACT_APP_VERSION=${{ env.GIT_TAG }}" >> $GITHUB_ENV
20+
- name: Set IMAGE_TAGS env variable
21+
if: github.ref == 'refs/heads/master'
22+
run: |
23+
echo "IMAGE_TAGS=latest,${{ github.sha }},${GITHUB_REF#refs/heads/}-${{ github.sha }}" >> $GITHUB_ENV
24+
- name: Set IMAGE_TAGS env variable
25+
if: github.ref != 'refs/heads/master'
26+
run: |
27+
echo "IMAGE_TAGS=${{ github.sha }},${GITHUB_REF#refs/heads/}-${{ github.sha }}" >> $GITHUB_ENV
2128
- name: Read environment variables
2229
run: |
2330
echo BRANCH: ${BRANCH}

0 commit comments

Comments
 (0)