Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use GITHUB_ENV for setting env vars #183

Merged
merged 1 commit into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gflows/workflows/build/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
if: github.event_name == 'pull_request'
name: configure environment for pull request
run: |
echo ::set-env name=GIT_BRANCH::$GITHUB_HEAD_REF
echo ::set-env name=GIT_COMMIT_SHA::$HEAD_SHA
echo "GIT_BRANCH=$GITHUB_HEAD_REF" >> $GITHUB_ENV
echo "GIT_COMMIT_SHA=$HEAD_SHA" >> $GITHUB_ENV
- env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
if: github.event_name == 'push'
name: configure environment for push
run: |
echo ::set-env name=GIT_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-env name=GIT_COMMIT_SHA::$GITHUB_SHA
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "GIT_COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
- name: prepare test reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
if: github.event_name == 'pull_request'
name: configure environment for pull request
run: |
echo ::set-env name=GIT_BRANCH::$GITHUB_HEAD_REF
echo ::set-env name=GIT_COMMIT_SHA::$HEAD_SHA
echo "GIT_BRANCH=$GITHUB_HEAD_REF" >> $GITHUB_ENV
echo "GIT_COMMIT_SHA=$HEAD_SHA" >> $GITHUB_ENV
- env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
if: github.event_name == 'push'
name: configure environment for push
run: |
echo ::set-env name=GIT_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-env name=GIT_COMMIT_SHA::$GITHUB_SHA
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "GIT_COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
- name: prepare test reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
Expand Down