Skip to content

Commit

Permalink
.github/workflows/code-checks.yml: verify defconfigs are up-to-date
Browse files Browse the repository at this point in the history
Change-Id: I9be3d920db15a755b7616a1d6fab5dc390bb6f0c
Signed-off-by: Sergii Dmytruk <[email protected]>
  • Loading branch information
SergiiDmytruk committed Jun 15, 2024
1 parent 33e9865 commit 7c23b79
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dasharo Checks
on:
pull_request:
branches:
- dasharo

jobs:
check-defconfigs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Checkout pull request HEAD commit instead of merge commit
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
ref: ${{ github.event.pull_request.head.sha }}
# Top commit is enough
fetch-depth: 1
- name: Verify defconfigs are up-to-date
run: |
# Start with the list of Dasharo boards that use EDK
boards=( $(grep -l 'Dasharo/edk2\(\.git\)\?"' configs/config.*) )
# Add non-EDK boards
boards+=( configs/config.dell_optiplex_9010_sff_txt )
boards+=( configs/config.protectli_vp46xx_txt_seabios )
# Update all of them before reporting anything
for c in $(printf "%s\n" "${boards[@]}" | sort); do
make savedefconfig DOTCONFIG="$c"
mv defconfig "$c"
done
# Print all the differences in a reusable form and fail or do nothing
git diff --exit-code

0 comments on commit 7c23b79

Please sign in to comment.