Update #401
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: Update | |
on: | |
schedule: | |
- cron: '0 4 * * 5' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v30 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: Update Erlang and Elixir | |
run: nix run ./dev#update-beam --update-input nixpkgs --no-write-lock-file | |
continue-on-error: true | |
id: updated | |
- name: Roll back if there is no modification | |
run: git reset --hard ${{ github.sha }} | |
if: ${{ steps.updated.outcome == 'failure' }} | |
- uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: 'Update' | |
# Use a fine-grained personal access token that can trigger other | |
# workflows | |
token: ${{ secrets.PAT_FOR_PR }} | |
base: master | |
title: 'chore: Update flake inputs' | |
branch: create-pull-request/update | |
labels: automation,update |