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

Pullrequest workflow - Use nx sha #9118

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
19 changes: 10 additions & 9 deletions .github/actions/before-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ runs:
echo "Setting up CI to run with commit flag [affected:*] flag."
echo "BREAK_ACTION=true" >> $GITHUB_ENV

- name: PULL_REQUEST event
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' && !github.event.pull_request.merged }}
- name: PULL_REQUEST event Derive appropriate NX SHAs for pull request
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' && !github.event.pull_request.merged }}
uses: nrwl/nx-set-shas@0e2d18b530b83b68263ff7b74e46b1ba300c83fc # v3.3.2
with:
main-branch-name: github.base_ref

- name: Print derinved NX SHAs
shell: bash
run: |
echo "Setting up CI flags for Pull Request event"
NX_CALCULATION_FLAGS="--base=origin/${GITHUB_BASE_REF} --head=$HEAD_HASH"
{
echo "NX_CALCULATION_FLAGS=$NX_CALCULATION_FLAGS";
echo "BASE_HASH=origin/${GITHUB_BASE_REF}";
echo "BREAK_ACTION=true";
} >> $GITHUB_ENV
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
echo -e "\033[38;05;34;1m NX_CALCULATION_FLAGS: $NX_CALCULATION_FLAGS \033[0m"

- name: RELEASE on master/develop patch branch
if: ${{ env.BREAK_ACTION == false && github.event.pull_request.merged }}
Expand Down
Loading