feature/remove-cache #38
73
.github/workflows/flake-update.yml
vendored
73
.github/workflows/flake-update.yml
vendored
@ -5,63 +5,9 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "00 12 * * *"
|
- cron: "00 12 * * *"
|
||||||
jobs:
|
jobs:
|
||||||
createPullRequest:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
# - name: Login to Docker Hub
|
|
||||||
# uses: docker/login-action@v3
|
|
||||||
# with:
|
|
||||||
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v24
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
experimental-features = nix-command flakes auto-allocate-uids configurable-impure-env
|
|
||||||
- name: Calculate pre-drv
|
|
||||||
run: nix run git+https://nayeonie.com/ahuston-0/flake-update-diff -- --build .
|
|
||||||
# - name: Pull latest docker images
|
|
||||||
# run: nix ./utils/fetch-docker.sh
|
|
||||||
- name: Update flake.lock (part 1)
|
|
||||||
run: nix flake update
|
|
||||||
- name: Calculate post-drv
|
|
||||||
run: nix run git+https://nayeonie.com/ahuston-0/flake-update-diff -- --build .
|
|
||||||
# - 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: Restore flake.lock for next step
|
|
||||||
# run: git restore flake.lock
|
|
||||||
# - name: Update flake.lock
|
|
||||||
# id: update
|
|
||||||
# uses: DeterminateSystems/update-flake-lock@main
|
|
||||||
# with:
|
|
||||||
# token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
|
||||||
# pr-body: |
|
|
||||||
# Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.
|
|
||||||
|
|
||||||
# ```
|
|
||||||
# {{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
# ```
|
|
||||||
|
|
||||||
# ```
|
|
||||||
# {{ env.POSTDIFF }}
|
|
||||||
# ```
|
|
||||||
# pr-labels: | # Labels to be set on the PR
|
|
||||||
# dependencies
|
|
||||||
# automated
|
|
||||||
update_lockfile:
|
update_lockfile:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
|
#if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -94,14 +40,13 @@ jobs:
|
|||||||
run: nix ./utils/eval-to-drv.sh post
|
run: nix ./utils/eval-to-drv.sh post
|
||||||
- name: Calculate diff
|
- name: Calculate diff
|
||||||
run: nix ./utils/diff-evals.sh
|
run: nix ./utils/diff-evals.sh
|
||||||
- name: Read diff into environment
|
- name: Read file contents
|
||||||
run: |
|
id: read_file
|
||||||
delimiter="$(openssl rand -hex 8)"
|
uses: andstor/file-reader-action@v1
|
||||||
{
|
with:
|
||||||
echo "POSTDIFF<<${delimiter}"
|
path: "post-diff"
|
||||||
cat post-diff
|
- name: File contents
|
||||||
echo "${delimiter}"
|
run: echo "${ steps.read_file.outputs.contents }"
|
||||||
} >> $GITHUB_ENV
|
|
||||||
- name: Write PR body template
|
- name: Write PR body template
|
||||||
uses: https://github.com/DamianReeves/write-file-action@v1.3
|
uses: https://github.com/DamianReeves/write-file-action@v1.3
|
||||||
with:
|
with:
|
||||||
@ -114,7 +59,7 @@ jobs:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
{{ env.POSTDIFF }}
|
{{ steps.read_file.outputs.contents }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Auto-generated by [update.yml][1] with the help of
|
Auto-generated by [update.yml][1] with the help of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user