Skip to content

Update flake dependencies #41

Update flake dependencies

Update flake dependencies #41

Workflow file for this run

name: Update flake dependencies
on:
schedule:
- cron: "0 16 * * 5"
workflow_dispatch: # for allowing manual triggers of the workflow
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup SSH for private flake inputs
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add GitHub to known hosts
run: ssh-keyscan github.com >> ~/.ssh/known_hosts
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- uses: cachix/cachix-action@v16
with:
name: dots
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Add nix-community cache
run: cachix use nix-community
- name: update flake.lock
run: nix flake update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
id: create-pr
with:
commit-message: "flake: update dependencies"
title: "[automation] update flake dependencies"
branch: "automation/update-flake-dependencies"
- name: Ping me in a comment on the PR
run: |
PR_NUMBER=${{ steps.create-pr.outputs.pull-request-number }}
COMMENT="Ping @towry"
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"