Skip to content

Commit

Permalink
Add Github action to validate generated files
Browse files Browse the repository at this point in the history
This is a quick Github action that tries to generate files when their
sources change and fails if the corresponding generated files are not
updated.

Signed-off-by: Marcelo E. Magallon <[email protected]>
  • Loading branch information
mem committed May 14, 2024
1 parent b052771 commit cd1e4bc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/bad-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Verify generated files"

on:
pull_request:
branches:
- main
paths:
- versions.yaml
- Dockerfile.tmpl

workflow_dispatch:

jobs:
validate:
name: Validate pull request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Verify generated files
run: |
# Generate Dockerfile
make Dockerfile
# Check if the generated Dockerfile is different from the one in the repository
git diff --no-ext-diff --quiet

0 comments on commit cd1e4bc

Please sign in to comment.