dotfiles

My PC Dotfiles & Website

.github/workflows/update.yml (2048B)


 1name: "chore: Automatic Scheduled Updates"
 2on:
 3  workflow_dispatch:
 4  schedule:
 5    - cron: "0 0 1 * *"
 6env:
 7  NIX_SHOW_STATS: 1
 8jobs:
 9  update:
10    runs-on: ubuntu-latest
11    steps:
12      - name: Clone Repo
13        uses: actions/checkout@v7
14        with:
15          token: ${{ secrets.GITHUB_TOKEN }}
16          fetch-depth: 0
17      - name: Install Nix
18        uses: cachix/install-nix-action@v31
19        with:
20          nix_path: nixpkgs=channel:nixos-unstable
21          extra_nix_config: |
22            experimental-features = nix-command flakes
23            accept-flake-config = true
24            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
25      - name: Update Flake Lock File
26        uses: DeterminateSystems/update-flake-lock@v29
27        with:
28          branch: update_flake
29          pr-labels: dependencies
30          pr-title: >
31            chore(flake): Update `inputs`
32      - name: Update Packages
33        env:
34          GIT_AUTHOR_NAME: github-actions[bot]
35          GIT_AUTHOR_EMAIL: <github-actions[bot]@users.noreply.github.com>
36          GIT_COMMITTER_NAME: github-actions[bot]
37          GIT_COMMITTER_EMAIL: <github-actions[bot]@users.noreply.github.com>
38        run: |
39          git checkout stable
40          cd packages && ./update.sh
41      - name: Create PR
42        uses: peter-evans/create-pull-request@v8
43        with:
44          branch: update_packages
45          delete-branch: true
46          title: >
47            chore(packages): Automatic Updates
48          labels: dependencies
49          body: |
50            Automated package updates using `packages/update.sh`.
51            ### Running GitHub Actions on this PR
52            GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action.
53            To run GitHub Actions workflows on this PR, run:
54            ```sh
55            git branch -D update_packages
56            git fetch origin
57            git checkout update_packages
58            git commit --amend --no-edit
59            git push origin update_packages --force
60            ```