Skip to content

archive validation

archive validation #6

name: Git Archive Content Check
on:
pull_request:
branches:
- master
paths:
- .github/workflows/archive-validation.yml
- .ci/github/arhcive_allow.txt
- ./*
push:
branches:
- master
paths:
- .github/workflows/archive-validation.yml
- .ci/github/arhcive_allow.txt
- ./*
jobs:
archive-validation:
name: Git Archive Content Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: number-of-new-files
run: |
number_of_new_files=$(for file in $(bash .ci/github/files_between_commits.sh $GITHUB_REF $GITHUB_SHA);
do
dirname $file;
done | sort | uniq | grep '^\.$' | wc -l)
echo "number_of_new_files=$number_of_new_files" >> $GITHUB_OUTPUT
- run: |
git archive -o archive.tar $GITHUB_SHA && sh .ci/github/validate_archive.sh archive.tar
if: ${{ steps.number-of-new-files.outputs.number_of_new_files > 0 }}