Skip to content

Fix syntax for accessing secrets in GitHub Actions update notifications #370

Fix syntax for accessing secrets in GitHub Actions update notifications

Fix syntax for accessing secrets in GitHub Actions update notifications #370

Workflow file for this run

name: Nix Flake Check
on:
pull_request:
paths:
- '**.nix'
- '.github/workflows/check.yml'
push:
branches:
- 'main'
paths:
- '**.nix'
- '.github/workflows/check.yml'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix flake check
auto-update:
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git checkout -b auto-update && git reset --hard origin/main && git push origin auto-update -f
- run: curl -d "Github Actions Update" ntfy.sh/${{ secrets.NTFY_UPDATE_TOPIC }}