sops-nix/.github/workflows/update-vendor-hash.yml
dependabot[bot] e4cffdf7d5 Bump actions/create-github-app-token from 1 to 2
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1 to 2.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 11:08:22 +02:00

33 lines
1.2 KiB
YAML

name: Update vendorHash
on: pull_request
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Update checksum
run: |
./scripts/update-vendor-hash.sh
# git push if we have a diff
if [[ -n $(git diff) ]]; then
git add default.nix
git config --global user.email "<49699333+dependabot[bot]@users.noreply.github.com>"
git config --global user.name "dependabot[bot]"
git commit -m "update vendorHash"
git push origin HEAD:${{ github.head_ref }}
fi