Skip to content

Commit

Permalink
ci(restore-node): avoid clobbering #endo-branch: setup
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Aug 7, 2023
1 parent c4e4693 commit 999d7d7
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/actions/restore-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ runs:
shell: bash
- uses: actions/checkout@v3
with:
clean: 'false'
clean: false
submodules: 'true'
persist-credentials: false
path: ${{ inputs.path }}
# Select a branch on Endo to test against by adding text to the body of the
# pull request. For example: #endo-branch: some-pr-branch
# The default is '*NONE*' to indicate not to check out Endo, just use
# The default is '*NOPE*' to indicate not to check out Endo, just use
# the published NPM packages.
- name: Get the appropriate Endo branch
id: endo-branch
Expand Down Expand Up @@ -131,9 +131,16 @@ runs:
- name: git dirty check
working-directory: ${{ inputs.path }}
run: |-
if [ -n "$(git status --porcelain)" ];
then
git status
exit 1
set -x
if [ "${{ steps.endo-branch.outputs.result }}" == NOPE ]; then
statout=$(git status --porcelain)
else
# In case of Endo override, ignore certain changes.
statout=$(git status --porcelain | grep -Eve '^ M (package\.json|yarn\.lock)$'; true)
fi
[ -n "$statout" ] || exit 0
git status
echo "Unexpected dirty git status" 1>&2
exit 1
shell: bash

0 comments on commit 999d7d7

Please sign in to comment.