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

refactor: use run step condition #55

Merged
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
10 changes: 4 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ runs:

- name: Optionally set the derived SHAs as NX_BASE and NX_HEAD environment variables for the current job
shell: bash
if: ${{ inputs.set-environment-variables-for-job == 'true' }}
run: |
# Built-in Github action conditionals are not supported in composite steps so have to check manually in bash
if [ "${{ inputs.set-environment-variables-for-job }}" = "true" ]; then
echo "NX_BASE=${{ steps.setSHAs.outputs.base }}" >> $GITHUB_ENV
echo "NX_HEAD=${{ steps.setSHAs.outputs.head }}" >> $GITHUB_ENV
echo "NX_BASE and NX_HEAD environment variables have been set for the current Job"
fi
echo "NX_BASE=${{ steps.setSHAs.outputs.base }}" >> $GITHUB_ENV
echo "NX_HEAD=${{ steps.setSHAs.outputs.head }}" >> $GITHUB_ENV
echo "NX_BASE and NX_HEAD environment variables have been set for the current Job"
branding:
icon: "terminal"
color: "blue"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "2.2.3",
"version": "2.2.4",
"license": "MIT",
"description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action",
"scripts": {
Expand Down