Auto-update packages #1399
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 packages" | |
on: | |
schedule: | |
# auto-update every day at 3:50 am | |
- cron: '50 3 * * *' | |
workflow_dispatch: | |
jobs: | |
auto-update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: master | |
# For triggering CI builds on generated PR. See /~https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-using-ssh-deploy-keys | |
ssh-key: ${{ secrets.SSH_DEPLOY_PRIVATE_KEY }} | |
- name: Install nix | |
uses: cachix/install-nix-action@v16 | |
with: | |
nix_path: "nixpkgs=channel:nixos-21.11" | |
- name: Show nixpkgs version | |
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' | |
- name: Auto-update | |
env: | |
XDG_RUNTIME_DIR: ${{ github.workspace }} | |
GIT_AUTHOR_NAME: Drew Risinger (bot) | |
GIT_AUTHOR_EMAIL: drewrisinger@users.noreply.github.com | |
GIT_COMMITTER_NAME: Drew Risinger (bot) | |
GIT_COMMITTER_EMAIL: drewrisinger@users.noreply.github.com | |
timeout-minutes: 30 | |
continue-on-error: true # want the PR to still submit even if some updates error | |
run: ./scripts/update-packages.sh | |
- name: Submit auto-update PR | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
title: "[Auto-Update]: Bump packages to latest version" | |
delete-branch: true | |
reviewers: drewrisinger |