Skip to content

Restore fragments with inlined-imports: true #26

Restore fragments with inlined-imports: true

Restore fragments with inlined-imports: true #26

Workflow file for this run

name: Compile check
on:
pull_request:
paths:
- '.github/workflows/gh-aw-*.md'
- '.github/workflows/gh-aw-*.lock.yml'
- '.github/workflows/gh-aw-fragments/**'
permissions:
contents: read
jobs:
compile-check:
name: Verify lock files are up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Detect gh-aw version from lock files
id: detect-version
run: |
version=$(head -1 .github/workflows/gh-aw-*.lock.yml | grep -oP '"compiler_version":"v\K[^"]+' | head -1)
echo "version=v${version}" >> "$GITHUB_OUTPUT"
- name: Install gh-aw
run: gh extension install github/gh-aw --pin ${{ steps.detect-version.outputs.version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compile
run: gh aw compile
- name: Check for uncommitted changes
run: |
if ! git diff --quiet .github/workflows/*.lock.yml; then
echo "::error::Lock files are out of date. Run 'make compile' and commit the changes."
git diff --stat .github/workflows/*.lock.yml
exit 1
fi