summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2024-11-17 20:42:23 +0100
committerEmma [it/its]@Rory& <root@rory.gay>2024-11-17 20:42:23 +0100
commit2c7d612ca247de099933d0b2e560ad1fec4b51dc (patch)
treeed836460674953ebf49c1e1c0bf5ab94a2a7cb2f /.github/workflows
parentMerge pull request #1231 from CyberL1/fix/user-profile-colors (diff)
downloadserver-ts-2c7d612ca247de099933d0b2e560ad1fec4b51dc.tar.xz
Make dependabot update nix hashes
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/dependabot-nix-update.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/dependabot-nix-update.yml b/.github/workflows/dependabot-nix-update.yml
new file mode 100644

index 00000000..13441c55 --- /dev/null +++ b/.github/workflows/dependabot-nix-update.yml
@@ -0,0 +1,44 @@ +name: Dependabot-nix-update + +on: + push: + branches: + - "dependabot/npm_and_yarn/*" + +jobs: + update_npm_deps_hash: + name: Update NPM dependencies hash + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + permissions: + contents: write + steps: + - name: Check Out Code + uses: actions/checkout@v3 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Configure Cache + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Update Hash + run: nix run .#update-nix + + - name: Set up Git Config + run: | + # Configure author metadata to look like commits are made by Dependabot + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + + - name: Commit changes + run: | + git add . + # Skip committing or pushing if there are no changes + if [[ $(git status -s) ]]; then + git commit -m "build(deps): update npm dependencies hash [dependabot skip]" --no-verify + git push + echo "Pushed an update to npm dependencies hash" + else + echo "Npm dependencies hash was not changed" + fi \ No newline at end of file