Auto Update Flake Inputs #4785
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: Auto Update Flake Inputs | |
on: | |
schedule: | |
# run this weekly at Monday 8am UTC | |
- cron: "* 19 * * 1" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# - uses: styfle/cancel-workflow-action@0.7.0 | |
# with: | |
# access_token: ${{ github.token }} | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Install clojure tools | |
uses: DeLaGuardo/setup-clojure@12.5 | |
with: | |
bb: "latest" | |
- uses: cachix/install-nix-action@v30 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare flakebot branch | |
run: | | |
git config --local user.email "flakebot@users.noreply.github.com" | |
git config --local user.name "flakebot" | |
git checkout -B flakebot | |
- name: Update and commit lockfile | |
run: bb modules/yqrashawn/home-manager/dotfiles/local-bins/update_flakes | |
# run: nix flake update --commit-lock-file | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GHT }} | |
branch: flakebot | |
force: true | |
- name: pull-request-action | |
uses: vsoch/pull-request-action@1.1.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GHT }} | |
PULL_REQUEST_FROM_BRANCH: "flakebot" | |
PULL_REQUEST_BRANCH: "master" | |
MAINTAINER_CANT_MODIFY: true | |
PASS_IF_EXISTS: true | |
PASS_ON_ERROR: true | |
PULL_REQUEST_TITLE: "Update Flake Inputs [CI]" |