33 lines
848 B
YAML
33 lines
848 B
YAML
name: diff-tag
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
dix:
|
|
runs-on: nix
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: diff latest tag against HEAD
|
|
run: |
|
|
tag=$(git tag --sort=-creatordate | head -n1)
|
|
if [ -z "$tag" ]; then
|
|
echo "No tags yet, skipping diff." | tee -a "$GITHUB_STEP_SUMMARY"
|
|
exit 0
|
|
fi
|
|
git worktree add "$RUNNER_TEMP/old" "$tag"
|
|
head=$(git rev-parse --short HEAD)
|
|
{
|
|
nix run .#ci -- diff "$RUNNER_TEMP/old" . \
|
|
"# System closure diff: \`$tag\` -> \`$head\`"
|
|
nix run .#ci -- inspect-diff "$RUNNER_TEMP/old" . \
|
|
"# Inspection diff: \`$tag\` -> \`$head\`"
|
|
} | tee -a "$GITHUB_STEP_SUMMARY"
|