41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: "Update private flake inputs"
|
|
on:
|
|
repository_dispatch:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 3 * * *" # Run daily at 3 AM
|
|
jobs:
|
|
update-private-flake:
|
|
runs-on: nix
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Update private flake inputs
|
|
run: |
|
|
# Update the private flake lock file
|
|
cd devFlake/private
|
|
nix flake update
|
|
cd ../..
|
|
|
|
# Update the narHash
|
|
bash ./devFlake/update-private-narhash
|
|
- name: Create pull request
|
|
env:
|
|
CI_BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
|
|
run: |
|
|
export GIT_AUTHOR_NAME=clan-bot GIT_AUTHOR_EMAIL=clan-bot@clan.lol GIT_COMMITTER_NAME=clan-bot GIT_COMMITTER_EMAIL=clan-bot@clan.lol
|
|
|
|
# Check if there are any changes
|
|
if ! git diff --quiet; then
|
|
git add devFlake/private/flake.lock devFlake/private.narHash
|
|
git commit -m "Update dev flake"
|
|
|
|
# Use shared PR creation script
|
|
export PR_BRANCH="update-dev-flake"
|
|
export PR_TITLE="Update dev flake"
|
|
export PR_BODY="This PR updates the dev flake inputs and corresponding narHash."
|
|
else
|
|
echo "No changes detected in dev flake inputs"
|
|
fi
|