Update flake inputs #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update flake inputs | |
on: | |
workflow_dispatch: | |
schedule: | |
# Monday updates gang | |
- cron: '0 0 * * 1' | |
permissions: write-all | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure git | |
env: | |
GITHUB_USER: fembotpixie | |
GITHUB_EMAIL: [email protected] | |
GITHUB_TOKEN: ${{ secrets.FEMBOT_TOKEN }} | |
run: | | |
git remote set-url origin "https://${GITHUB_TOKEN}:[email protected]/${GITHUB_REPOSITORY}.git"; | |
git config --local user.email "${GITHUB_EMAIL}"; | |
git config --local user.name "${GITHUB_USER}"; | |
- name: Switch branch | |
run: git switch -c update/flake | |
- name: Update flake | |
run: nix flake update --commit-lock-file | |
- name: Push to repository | |
run: git push -f --set-upstream origin $(git rev-parse --abbrev-ref HEAD) | |
- name: Create pull request | |
env: | |
GITHUB_TOKEN: ${{ secrets.FEMBOT_TOKEN }} | |
run: 'gh pr create -B main -t "build(flake): update inputs" -b "*Automatic action*"' |