Skip to content

Commit eaf59f2

Browse files
committed
github: next workflow: work smarter
1 parent 34a071b commit eaf59f2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/update.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/usr/bin/env bash
22

3-
git switch -C main-next-wip
3+
set -x
4+
set -euo pipefail
5+
6+
git fetch --all
7+
git switch main-next-wip
8+
OLDREV="$(git rev-parse main-next-wip)"
9+
410
git reset --hard origin/main
5-
git push origin HEAD -f
611

712
nix flake update --commit-lock-file
813

9-
# TODO(colemickens): confirm this puts nix flake inputs into cache?
10-
nix flake archive
14+
if git diff --exit-code HEAD origin/main-next-wip -- flake.lock; then
15+
echo "no material flake.lock diff"
16+
echo "abandoning"
17+
exit 0
18+
fi
1119

1220
git push --set-upstream origin main-next-wip

0 commit comments

Comments
 (0)