Periodic flake bump #162
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: Periodic flake bump | |
on: | |
# Trigger this workflow every 12 hours | |
schedule: | |
- cron: "0 0,12 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: "accept-flake-config = true" | |
- uses: actions/checkout@v3 | |
- name: Update nixpkgs flake | |
run: nix flake update || exit 1; git diff --exit-code flake.lock && exit 1 || exit 0 | |
continue-on-error: true | |
id: bump | |
- name: Commit nixpkgs bump | |
if: steps.bump.outcome == 'success' | |
run: | | |
set -e | |
git config --global user.name 'Chaotic-Temeraire' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.PAT_CHAOTIC }}@github.com/${{ github.repository }} | |
git add flake.lock | |
git commit -m "βοΈ chore(flake.lock): bump inputs to $(date +%Y%m%d)" | |
git push |