-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (53 loc) · 1.75 KB
/
Copy pathValidateInfoFile.yml
File metadata and controls
57 lines (53 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Validate info file
permissions:
contents: read
on:
pull_request_target:
types: [opened, synchronize]
paths:
- 'UserData/**'
jobs:
ValidateInfoFile:
if: "${{ github.event.pull_request.head.repo.full_name == 'NMRlipids/UserData' && github.repository == 'NMRlipids/BilayerData' }}"
runs-on: ubuntu-latest
container:
image: nmrlipids/core
options: --user 1001:118 # run container as uid=1001,gid=118 to match the GitHub runner user
env:
FMDL_DATA_PATH: ${{ github.workspace }}/BilayerData
steps:
- name: Checkout BilayerData
uses: actions/checkout@v7
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
path: BilayerData
persist-credentials: false
- name: Check if info.yml exists
id: check_info
working-directory: BilayerData
shell: bash
run: |
if [ -f "UserData/info.yml" ]; then
echo "found=true" >> $GITHUB_OUTPUT
echo "info.yml found"
else
echo "found=false" >> $GITHUB_OUTPUT
echo "info.yml not found, skipping further steps"
fi
- name: Checkout Databank
if: steps.check_info.outputs.found == 'true'
uses: actions/checkout@v7
with:
repository: NMRLipids/Databank
ref: main
path: Databank
- name: Run dry run of AddData
if: steps.check_info.outputs.found == 'true'
env:
TQDM_DISABLE: True
working-directory: Databank
run: |
pip install .
python developer/process_info_file.py \
--info_file_path ../BilayerData/UserData/info.yml --dry-run