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

Commit e2e53f5

Browse files
authored
Merge pull request #338 from mareklibra/githubActions.setEnv
Avoid use of set-env in GitHub actions
2 parents b5a72a2 + 1f5d895 commit e2e53f5

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.github/workflows/mergeToMaster.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Get tag
13+
id: get_tag
14+
run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
15+
- run: |
16+
echo Detected GIT_TAG: ${GIT_TAG}
1217
- name: Check out code
1318
uses: actions/checkout@v1
1419
- name: Install dependencies
@@ -19,9 +24,6 @@ jobs:
1924
uses: borales/actions-yarn@v2.0.0
2025
with:
2126
cmd: lint
22-
- name: Get tag
23-
id: get_tag
24-
run: echo ::set-env name=GIT_TAG::${GITHUB_REF#refs/tags/}
2527
- name: Build code
2628
uses: borales/actions-yarn@v2.0.0
2729
env:

.github/workflows/release.yaml

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ name: Build and push on release (new tag)
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Get tag
13+
id: get_tag
14+
run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
15+
- run: |
16+
echo Detected GIT_TAG: ${GIT_TAG}
1217
- name: Check out code
1318
uses: actions/checkout@v1
1419
- name: Install dependencies
@@ -19,13 +24,10 @@ jobs:
1924
uses: borales/actions-yarn@v2.0.0
2025
with:
2126
cmd: lint
22-
- name: Get tag
23-
id: get_tag
24-
run: echo ::set-env name=GIT_TAG::${GITHUB_REF#refs/tags/}
2527
- name: Build code
2628
uses: borales/actions-yarn@v2.0.0
2729
env:
28-
NODE_OPTIONS: '--max-old-space-size=8192'
30+
NODE_OPTIONS: "--max-old-space-size=8192"
2931
REACT_APP_GIT_SHA: ${{ github.sha }}
3032
REACT_APP_VERSION: ${{ env.GIT_TAG }}
3133
with:
@@ -38,7 +40,7 @@ jobs:
3840
password: ${{ secrets.QUAYIO_OCPMETAL_PASSWORD }}
3941
registry: quay.io
4042
dockerfile: Dockerfile
41-
tags: 'stable,${{ env.GIT_TAG }},${{ github.sha }}'
43+
tags: "stable,${{ env.GIT_TAG }},${{ github.sha }}"
4244
- name: Publish integration tests to quay.io
4345
uses: elgohr/Publish-Docker-Github-Action@2.14
4446
with:
@@ -47,4 +49,4 @@ jobs:
4749
password: ${{ secrets.QUAYIO_OCPMETAL_PASSWORD }}
4850
registry: quay.io
4951
dockerfile: Dockerfile.cypress
50-
tags: 'stable,${{ env.GIT_TAG }},${{ github.sha }}'
52+
tags: "stable,${{ env.GIT_TAG }},${{ github.sha }}"

0 commit comments

Comments
 (0)