2024-05-13 09:47:08 +00:00
|
|
|
on:
|
2024-05-13 11:41:52 +00:00
|
|
|
schedule:
|
2024-05-13 12:50:47 +00:00
|
|
|
- cron: '*/5 * * * *'
|
2024-05-13 09:47:08 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-flake:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: https://github.com/cachix/install-nix-action@v26
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
github_access_token: '${{ secrets.GH_TOKEN }}'
|
|
|
|
- name: Create branch
|
|
|
|
run: git switch -c update/flake-lock
|
|
|
|
- name: Update flake.lock
|
|
|
|
run: nix flake update --commit-lock-file
|
|
|
|
env:
|
|
|
|
GIT_AUTHOR_NAME: kitchen-ci
|
|
|
|
GIT_AUTHOR_EMAIL: do-not-reply@buffets.kitchen
|
|
|
|
GIT_COMMITTER_NAME: kitchen-ci
|
|
|
|
GIT_COMMITTER_EMAIL: do-not-reply@buffets.kitchen
|
|
|
|
- name: Push to repo
|
|
|
|
run: git push -f origin update/flake-lock
|
|
|
|
- name: Create PR
|
|
|
|
run: >
|
|
|
|
curl -X POST "${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/pulls"
|
|
|
|
--fail
|
|
|
|
-H "Content-Type: application/json"
|
|
|
|
-H "Authorization: token ${{ env.GITHUB_TOKEN }}"
|
|
|
|
-d '{
|
|
|
|
"title": "build(flake): update inputs",
|
|
|
|
"body": "",
|
|
|
|
"base": "main",
|
|
|
|
"head": "update/flake-lock",
|
|
|
|
"assignee: "chef"
|
|
|
|
}'
|