Skip to content

Update hashes

Update hashes #428

Workflow file for this run

name: Update hashes
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '00 8 * * *' # runs daily at 8:00
jobs:
update-hashes:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Set environment variables
shell: bash
run: |
echo "GIT_AUTHOR_NAME=github-actions[bot]" >> $GITHUB_ENV
echo "GIT_AUTHOR_EMAIL=<github-actions[bot]@users.noreply.github.com>" >> $GITHUB_ENV
echo "GIT_COMMITTER_NAME=github-actions[bot]" >> $GITHUB_ENV
echo "GIT_COMMITTER_EMAIL=<github-actions[bot]@users.noreply.github.com>" >> $GITHUB_ENV
- name: Update all hashes
shell: bash
run: |
git rm hashes/*.nix
nix run .#generate-all-hashes
git add hashes/*.nix
git commit -m "hashes: update"
- name: Update latest release
shell: bash
run: |
nix eval -f generate-latest-release.nix > latest-release.nix
git add latest-release.nix
git commit -m "latest-release: update" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}