Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Change update workflow to update all nix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuavio committed Oct 5, 2023
1 parent 4fc0a15 commit a4545d8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: update-nixpkgs
name: niv-update
on:
workflow_dispatch:
schedule:
Expand All @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get date
run: echo "BRANCH_NAME=nixpkgs-update-$(date +'%Y-%m-%dT%H%M%S')" >> $GITHUB_ENV
run: echo "BRANCH_NAME=niv-update-$(date +'%Y-%m-%dT%H%M%S')" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
Expand All @@ -19,13 +19,13 @@ jobs:
with:
name: rosuavio-personal
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix-shell --run "niv update nixos-23.05"
- run: nix-shell --run "niv update"
- run: |
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git checkout -b $BRANCH_NAME
git commit -am "Update nixos-23.05"
git commit -am "niv update"
git push -u origin $BRANCH_NAME
# Fallowing https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
# I would like to not depend on anything here
Expand All @@ -41,7 +41,7 @@ jobs:
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
- name: create pull request
run: |
PR=$(gh pr create -B main -H $BRANCH_NAME --title "Update nixos-23.05" --body "Update nixos-23.05")
PR=$(gh pr create -B main -H $BRANCH_NAME --title "niv update" --body "Update nix dependencies with niv")
gh pr merge $PR -d --rebase --auto
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

0 comments on commit a4545d8

Please sign in to comment.