move to new flake eval scripts
Some checks failed
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 12s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Has been cancelled
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Has been cancelled
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 2m48s
Some checks failed
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 12s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Has been cancelled
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Has been cancelled
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 2m48s
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
44
.github/workflows/flake-update.yml
vendored
44
.github/workflows/flake-update.yml
vendored
@ -7,7 +7,6 @@ on:
|
||||
jobs:
|
||||
createPullRequest:
|
||||
runs-on: ubuntu-latest
|
||||
# if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# - name: Login to Docker Hub
|
||||
@ -21,13 +20,6 @@ jobs:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
install_url: https://releases.nixos.org/nix/nix-2.19.0/install
|
||||
- name: Setup Attic cache
|
||||
uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||
cache: ${{ secrets.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
skip-push: "true"
|
||||
- name: Calculate pre-drv
|
||||
run: nix run git+https://nayeonie.com/ahuston-0/flake-update-diff -- --build .
|
||||
# - name: Pull latest docker images
|
||||
@ -70,12 +62,21 @@ jobs:
|
||||
# automated
|
||||
update_lockfile:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install nix
|
||||
uses: https://github.com/DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- name: Setup Attic cache
|
||||
uses: ryanccn/attic-action@v0
|
||||
with:
|
||||
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||
cache: ${{ secrets.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
skip-push: "true"
|
||||
- name: Get pre-snapshot of evaluations
|
||||
run: nix ./utils/eval-to-drv.sh pre
|
||||
- name: Update flake.lock
|
||||
id: update
|
||||
run: |
|
||||
@ -90,7 +91,18 @@ jobs:
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
rm update.log
|
||||
|
||||
- name: Get post-snapshot of evaluations
|
||||
run: nix ./utils/eval-to-drv.sh post
|
||||
- name: Calculate diff
|
||||
run: nix ./utils/diff-evals.sh
|
||||
- name: Read diff into environment
|
||||
run: |
|
||||
delimiter="$(openssl rand -hex 8)"
|
||||
{
|
||||
echo "POSTDIFF<<${delimiter}"
|
||||
cat post-diff
|
||||
echo "${delimiter}"
|
||||
} >> $GITHUB_ENV
|
||||
- name: Write PR body template
|
||||
uses: https://github.com/DamianReeves/write-file-action@v1.3
|
||||
with:
|
||||
@ -102,10 +114,14 @@ jobs:
|
||||
${{ env.UPDATE_LOG }}
|
||||
```
|
||||
|
||||
```
|
||||
{{ env.POSTDIFF }}
|
||||
```
|
||||
|
||||
Auto-generated by [update.yml][1] with the help of
|
||||
[create-pull-request][2].
|
||||
|
||||
[1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml
|
||||
[1]: https://nayeonie.com/ahuston-0/nix-dotfiles/src/branch/main/.github/workflows/flake-update.yml
|
||||
[2]: https://forgejo.stefka.eu/jiriks74/create-pull-request
|
||||
|
||||
- name: Generate PR body
|
||||
@ -123,6 +139,9 @@ jobs:
|
||||
run: |
|
||||
rm pr_body.template
|
||||
rm pr_body.md
|
||||
rm pre.json
|
||||
rm post.json
|
||||
rm post-diff
|
||||
|
||||
- name: Create Pull Request
|
||||
id: create-pull-request
|
||||
@ -140,6 +159,9 @@ jobs:
|
||||
|
||||
branch: update-flake-lock
|
||||
delete-branch: true
|
||||
pr-labels: | # Labels to be set on the PR
|
||||
dependencies
|
||||
automated
|
||||
- name: Push to Attic
|
||||
run: nix ./utils/attic-push.bash
|
||||
continue-on-error: true
|
||||
|
Reference in New Issue
Block a user