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

Change update workflow to update all nix deps #108

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}