Skip to content

(Cron) Synchronize upstream flake inputs #41

(Cron) Synchronize upstream flake inputs

(Cron) Synchronize upstream flake inputs #41

---
name: (Cron) Synchronize upstream flake inputs
on:
workflow_dispatch:
schedule:
# Run this Action every 3 days at 0:00pm UTC
- cron: "0 0 */3 * *"
env:
OWNER: piyoki
TARGETS: |
pilots
chaotic
home-manager
sops-nix
nixpkgs-wayland
hyprland
neovim-nightly-overlay
impermanence
pre-commit-hooks
microvm
nix-fast-build
auto-cpufreq
PR_LABELS: |
flake-lock
automated
GIT_COMMIT_MESSAGE: "chore(flake) update flake.lock for the selected upstream inputs"
jobs:
sync-upstream:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub auth token
# https://github.com/tibdex/github-app-token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- uses: actions/checkout@main
with:
# ref: master
# submodules: true
token: ${{ steps.generate_token.outputs.token }}
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- name: Update flake.lock
id: update-flake-lock
uses: DeterminateSystems/update-flake-lock@main
with:
pr-title: ${{ env.GIT_COMMIT_MESSAGE }}
pr-labels: ${{ env.PR_LABELS }}
inputs: ${{ env.TARGETS }}
token: ${{ steps.generate_token.outputs.token }}
pr-assignees: ${{ env.OWNER }}
- name: Print PR number
run: |
echo "Pull request number is ${{ steps.update-flake-lock.outputs.pull-request-number }}"