forked from SiEPIC/openEBL-2024-10
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SiEPIC:main' into main
- Loading branch information
Showing
26 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Check GDS and OAS File Submissions | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
check_files: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get list of changed files | ||
id: changed_files | ||
run: | | ||
# Get the list of files changed in the PR | ||
# echo "::set-output name=files::$(git diff --name-only origin/main HEAD)" | ||
# get added/modified py files | ||
if [ "${{ github.event_name }}" == "push" ]; then | ||
echo "::set-output name=files::$(git diff --name-only --diff-filter=ACM ${{ github.event.before }} ${{ github.sha }})" | ||
else | ||
echo "::set-output name=files::$(git diff --name-only --diff-filter=ACM FETCH_HEAD)" | ||
fi | ||
- name: Check GDS and OAS file locations and names | ||
run: | | ||
# Get the list of changed files from the previous step | ||
changed_files="${{ steps.changed_files.outputs.files }}" | ||
# Split files into an array | ||
IFS=$'\n' read -r -d '' -a file_array <<< "$changed_files" | ||
# Loop over the files | ||
for file in "${file_array[@]}"; do | ||
# Check if the file ends with .gds or .oas | ||
if [[ "$file" == *.gds || "$file" == *.oas ]]; then | ||
# Check if the file is in the submissions folder | ||
if [[ "$file" != submissions/* ]]; then | ||
echo "Error: File '$file' is not in the 'submissions' folder." | ||
exit 1 | ||
fi | ||
# Check if the file contains any spaces in the name | ||
if [[ "$file" == *" "* ]]; then | ||
echo "Error: File '$file' contains spaces in the filename." | ||
exit 1 | ||
fi | ||
fi | ||
done | ||
shell: bash | ||
|
||
- name: Success message | ||
if: success() | ||
run: echo "All GDS and OAS files are correctly placed in the submissions folder and contain no spaces in their filenames." |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.