Skip to content

Commit

Permalink
ci: use gacts/run-and-post-run@v1 for commands in run and post-run
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Aug 1, 2024
1 parent 712e7d7 commit 3dacff0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 57 deletions.
24 changes: 10 additions & 14 deletions .github/actions/restore-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,28 +181,24 @@ runs:
mkdir -p node_modules/.cache/agoric
date > node_modules/.cache/agoric/yarn-built
# Refs: https://github.com/orgs/community/discussions/45342
- name: Validate Git Tree in Root Directory
if: inputs.path == '.'
uses: ./.github/actions/with-post-step
- name: Validate Git Tree Cleanliness
uses: gacts/run-and-post-run@v1
with:
main: echo "Checking Git tree for changes in the root directory..."
post: |
working-directory: ${{ inputs.path }}
shell: bash
run: |
set -x
if [ -n "$(git status --porcelain | grep -vE 'junit.xml$' | grep -vE '^[?][?] endo-sha.txt$|^.'; true)" ]; then
changes=$(git status --porcelain | grep -vE 'junit.xml$' | grep -vE '^\?\? endo-sha.txt$')
if [ -n "$changes" ]; then
git status
echo "Unexpected dirty git status in default path" 1>&2
echo "Unexpected dirty git status in Agoric SDK path" 1>&2
exit 1
fi
- name: Validate Git Tree in Agoric SDK Directory
if: inputs.path == './agoric-sdk'
uses: ./agoric-sdk/.github/actions/with-post-step
with:
main: echo "Checking Git tree for changes in the root directory..."
post: |
set -x
if [ -n "$(git status --porcelain | grep -vE 'junit.xml$' | grep -vE '^[?][?] endo-sha.txt$|^.'; true)" ]; then
changes=$(git status --porcelain | grep -vE 'junit.xml$' | grep -vE '^\?\? endo-sha.txt$')
if [ -n "$changes" ]; then
git status
echo "Unexpected dirty git status in Agoric SDK path" 1>&2
exit 1
Expand Down
21 changes: 0 additions & 21 deletions .github/actions/with-post-step/action.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/actions/with-post-step/main.cjs

This file was deleted.

0 comments on commit 3dacff0

Please sign in to comment.