Skip to content

Commit

Permalink
ci: Update after-merge workflow to tolerate non-dirty git state (#9721)
Browse files Browse the repository at this point in the history
Ref #9709
Ref #9708

## Description
As of #9709, git state may not include untracked files after our custom [restore-node GitHub action](https://github.com/Agoric/agoric-sdk/blob/7bde505dd23289218a19bc86f8e94bbff48b65e0/.github/actions/restore-node/action.yml), in which case the after-merge workflow job "dev-canary" will execute a [no-op `git stash` followed later by a no-op `git stash apply`](https://github.com/Agoric/agoric-sdk/blob/7bde505dd23289218a19bc86f8e94bbff48b65e0/.github/workflows/after-merge.yml#L78-L84), the latter of which exits with a non-zero status code that fails the step and thereby the containing job.

This PR fixes things to tolerate absence of any stashed changes.

### Security Considerations
No relevant change.

### Scaling Considerations
n/a

### Documentation Considerations
n/a

### Testing Considerations
It's difficult to test these kinds of changes, but the proof of the pudding is in the taste.

### Upgrade Considerations
n/a
  • Loading branch information
gibson042 authored Jul 16, 2024
1 parent 7bde505 commit 294c67b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/after-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ jobs:
;;
esac
# Prevent `lerna publish` from failing due to uncommitted changes.
git stash
git stash || true
# without concurrency until https://github.com/Agoric/agoric-sdk/issues/8091
yarn lerna publish --concurrency 1 --conventional-prerelease --canary --exact \
--dist-tag=$TAG --preid=$TAG-$(git rev-parse --short=7 HEAD) \
--no-push --no-verify-access --yes
# restore the stashed changes for caching
git stash apply
# restore any stashed changes for caching
git stash pop || true
- name: notify on failure
if: failure()
uses: ./.github/actions/notify-status
Expand Down

0 comments on commit 294c67b

Please sign in to comment.