Skip to content

Merge pull request #234 from felenitaribeiro/patch-7 #102

Merge pull request #234 from felenitaribeiro/patch-7

Merge pull request #234 from felenitaribeiro/patch-7 #102

name: Update neurocontainers
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/update-neurocontainers.yml'
- 'neurodesk/apps.json'
- 'neurodesk/write_log.py'
# pull_request_target:
# types:
# - closed
# branches:
# - main
# paths:
# - '.github/workflows/update-neurocontainers.yml'
# - 'neurodesk/apps.json'
# - 'neurodesk/write_log.py'
env:
ORACLE_USER: ${{ secrets.ORACLE_USER }}
ORACLE_NEURODESK_BUCKET: ${{ secrets.ORACLE_NEURODESK_BUCKET }}
# DOCKERHUB_ORG: ${{ secrets.DOCKERHUB_ORG }}
# OS_PASSWORD: ${{ secrets.SWIFT_OS_PASSWORD }}
# OS_PROJECT_ID: ${{ secrets.SWIFT_OS_PROJECT_ID }}
# OS_USERNAME: ${{ secrets.SWIFT_OS_USERNAME }}
# OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.SWIFT_OS_APPLICATION_CREDENTIAL_ID }}
# OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.SWIFT_OS_APPLICATION_CREDENTIAL_SECRET }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
jobs:
upload_containers_simg:
runs-on: ubuntu-20.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 40000
swap-size-mb: 1024
overprovision-lvm: 'true'
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name : Check if singularity container files exist in oracle cloud and build & upload if not there
run: /bin/bash .github/workflows/upload_containers_simg.sh
- name: Auto commit changes to applist.json
uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
- name: "Run if changes found to applist.json"
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: |
curl -X POST https://api.github.com/repos/NeuroDesk/neurodesk.github.io/dispatches \
-H 'Accept: application/vnd.github.v3+json' \
-u ${{ secrets.ACCESS_TOKEN }} \
--data '{"event_type": "NeuroDesk/neurocommand applist.json update"}'