-
Notifications
You must be signed in to change notification settings - Fork 19
52 lines (50 loc) · 1.85 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Auto Update Flake Inputs
on:
schedule:
# run this daily at 8am UTC, or roughly 4am eastern
- cron: "* 19 * * *"
# 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]"