# Fails when .github/workflows/actions.lock is out of sync with the
# workflows or a locked pin no longer verifies upstream.

name: verify-lockfile

on:
  pull_request:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  verify:
    runs-on: ubuntu-latest
    env:
      GH_TOKEN: ${{ github.token }}
    steps:
      - name: Check out repository
        uses: actions/checkout@v7.0.1
        with:
          persist-credentials: false
      - name: Install gh-actions-lock
        run: gh extension install github/gh-actions-lock --pin v0.4.1
      - name: Verify actions lockfile
        run: gh actions-lock --verify
