Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Remove nix flake show diff generation #176

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,4 @@ jobs:
if: ${{ github.event.pull_request.head.repo.fork }}
with:
upstream-cache: https://ngi.cachix.org/
- id: flake-show-diff
name: Obtain `nix flake show` output
run: |
shopt -s expand_aliases
alias show="nix flake show --all-systems"
alias filter="nix run nixpkgs#ansifilter | tail -n +2"
alias short="git rev-parse --short"
git fetch origin ${GITHUB_BASE_REF}:${GITHUB_BASE_REF}
if diff -U 1024 \
--label "$(short $GITHUB_BASE_REF) $GITHUB_BASE_REF" <(show ".?rev=$(git rev-parse ${GITHUB_BASE_REF})" | filter) \
--label "$(short HEAD) $GITHUB_HEAD_REF" <(show | filter) \
>> diff
then
echo 'output=No difference in `nix flake show`.' >> "$GITHUB_OUTPUT"
else
echo -e 'output<<EOF\n<details><summary>Difference in <code>nix flake show</code>.</summary>\n\n```diff' >> "$GITHUB_OUTPUT"
cat diff >> "$GITHUB_OUTPUT"
echo -e '```\n</details>\nEOF' >> "$GITHUB_OUTPUT"
fi
- uses: thollander/actions-comment-pull-request@v2
with:
message: ${{ steps.flake-show-diff.outputs.output }}
- run: nix ${{ runner.debug && '--debug --print-build-logs' }} flake check
Loading