mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-05 17:48:40 +00:00
Delete .github/workflows/flake_update.yaml (#136)
This commit is contained in:
54
.github/workflows/flake_update.yaml
vendored
54
.github/workflows/flake_update.yaml
vendored
@@ -1,54 +0,0 @@
|
|||||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
|
|
||||||
name: Weekly Nix Flake Update
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * 0' # Runs at 00:00 every Sunday
|
|
||||||
workflow_dispatch: # Allows manual triggering
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-nix-flake:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Update Nix flake
|
|
||||||
run: 'nix flake update'
|
|
||||||
|
|
||||||
- name: Build fetch-deps
|
|
||||||
run: 'nix build ".#default.fetch-deps"'
|
|
||||||
|
|
||||||
- name: Run fetch-deps
|
|
||||||
run: ./result nix/deps.json
|
|
||||||
|
|
||||||
- name: Format
|
|
||||||
run: 'nix develop --command alejandra .'
|
|
||||||
|
|
||||||
- name: Create token
|
|
||||||
id: generate-token
|
|
||||||
uses: actions/create-github-app-token@v2
|
|
||||||
with:
|
|
||||||
# https://github.com/actions/create-github-app-token/issues/136
|
|
||||||
app-id: ${{ secrets.APP_ID }}
|
|
||||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Raise pull request
|
|
||||||
uses: Smaug123/commit-action@cc25e6d80a796c49669dda4a0aa36c54c573983d
|
|
||||||
id: cpr
|
|
||||||
with:
|
|
||||||
bearer-token: ${{ steps.generate-token.outputs.token }}
|
|
||||||
pr-title: "Upgrade Nix flake and deps"
|
|
||||||
|
|
||||||
- name: Enable Pull Request Automerge
|
|
||||||
if: ${{ steps.cpr.outputs.pull-request-number }}
|
|
||||||
uses: peter-evans/enable-pull-request-automerge@v3
|
|
||||||
with:
|
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
|
||||||
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
|
||||||
merge-method: squash
|
|
Reference in New Issue
Block a user