Skip to content

chore: update flake.lock & sources (2024-12-28) #28

chore: update flake.lock & sources (2024-12-28)

chore: update flake.lock & sources (2024-12-28) #28

Workflow file for this run

name: "Additional Info for PR"
permissions:
pull-requests: write
on:
pull_request
jobs:
provide-data:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: Substituters
id: substituters
run: |
echo "TRUSTED_PUBLIC_KEYS=$(./nix.sh ci_get trusted-public-keys)" >> "$GITHUB_OUTPUT"
echo "SUBSTITUTERS=$(./nix.sh ci_get trusted-substituters)" >> "$GITHUB_OUTPUT"
- name: "Install Nix"
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
trusted-public-keys = ${{ steps.substituters.outputs.TRUSTED_PUBLIC_KEYS }}
substituters = ${{ steps.substituters.outputs.SUBSTITUTERS }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: "Build both closures"
id: build
# nix develop .#ci --command bash -c "nix-fast-build --debug --no-nom --out-link result_old --flake github:${{ github.repository }}#nixosConfigurations.hp-laptop.config.system.build.toplevel"
# nix develop .#ci --command bash -c "nix-fast-build --debug --no-nom --out-link result_new --flake .#nixosConfigurations.hp-laptop.config.system.build.toplevel"
# mv result_old- result_old
# mv result_new- result_new
run: |
./nix.sh ci_increase_storage
nix build --out-link result_old github:${{ github.repository }}#nixosConfigurations.hp-laptop.config.system.build.toplevel
nix build --out-link result_new .#nixosConfigurations.hp-laptop.config.system.build.toplevel
- name: "Diff Profile Closures"
id: profile-diff
run: |
echo "Profile diff:" >> comment.txt
echo "\`\`\`" >> comment.txt
nix store diff-closures ./result_old ./result_new 2>&1 | tee -a comment.txt
echo "\`\`\`" >> comment.txt
- name: "Generate Vulnix Report"
id: vulnix
run: |
echo "Vulnerabilities in closure: " >> comment.txt
nix shell nixpkgs#vulnix --command bash -c "vulnix ./result_new 2>&1 | tee -a comment.txt"
- name: PR comment with file
uses: thollander/actions-comment-pull-request@v2
with:
filePath: ./comment.txt
# TODO: Flakes and Sources changelog from their respective git repositories.