Update flake inputs #37
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 flake inputs | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 12 * * *" | |
jobs: | |
update-flake-inputs: | |
name: Update flake inputs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: Setup Git user | |
run: | | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v4 | |
- name: Install bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
working-directory: .github/scripts/update-flake-inputs | |
run: bun install | |
- id: update-flake-inputs | |
name: Update flake inputs | |
env: | |
flake_inputs: "agenix hyprland spicetify-nix nix-scripts zen-browser encore flake-utils nix-nostd" | |
run: | | |
pr_title="$(.github/scripts/update-flake-inputs/index.ts ${{ env.flake_inputs }})" | |
echo "pr_title=$pr_title" >> "$GITHUB_OUTPUT" | |
# can be more interesting if a list of updated flake inputs is provided at body | |
# even with metadata about the old and new version | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.PAT }} | |
commit-message: "chore: artifacts created when updating flake inputs" | |
title: ${{ steps.update-flake-inputs.outputs.pr_title }} # "Update: Hyprland, Spicetify, Flake utils and more...!" | |
branch: "update-flake-inputs" | |
delete-branch: true | |
labels: "dependencies" |