Upload Portal: Simulation files from matejkanduc #119
Workflow file for this run
This file contains hidden or 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
| name: Process info file from pull request | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened] | |
| paths: | |
| - 'UserData/**' | |
| jobs: | |
| AddData: | |
| if: "${{ github.event.pull_request.head.repo.full_name == 'NMRLipids/UserData' && github.repository == 'NMRLipids/BilayerData' }}" | |
| runs-on: nrec-large | |
| environment: user_data_addition | |
| timeout-minutes: 7200 | |
| container: | |
| image: nmrlipids/core | |
| options: --user 1000:1000 | |
| env: | |
| FMDL_DATA_PATH: ${{ github.workspace }}/BilayerData | |
| MEM_CUTOFF: 1500000000 | |
| 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: Checkout Databank | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: NMRLipids/FAIRMD_lipids | |
| ref: main | |
| path: Databank | |
| - name: Compute new data | |
| env: | |
| TQDM_DISABLE: True | |
| fmdl_STRICT_MODE: True | |
| working-directory: Databank | |
| run: | | |
| pip install . | |
| python developer/process_info_file.py \ | |
| --info_file_path ../BilayerData/UserData/info.yml | |
| - uses: actions/create-github-app-token@v3 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| owner: ${{ github.event.pull_request.head.repo.owner.login }} | |
| repositories: ${{ github.event.pull_request.head.repo.name }} | |
| - name: Add, commit and push changes | |
| working-directory: BilayerData | |
| run: | | |
| git config user.name "simulation-addition-admin[bot]" | |
| git config user.email "simulation-addition-admin[bot]@users.noreply.github.com" | |
| TOKEN='${{ steps.app-token.outputs.token }}' | |
| REPO='${{ github.event.pull_request.head.repo.full_name }}' | |
| git remote set-url origin "https://x-access-token:${TOKEN}@github.com/${REPO}.git" | |
| git add Simulations/**/*.yaml Simulations/**/*.json | |
| git rm UserData/*.yml | |
| git commit -m "Process info.yml [bot]" | |
| git push |