Skip to content

Scheduler - main

Scheduler - main #34

jobs:
scheduler:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
- name: Pull Docker image
run: docker pull ghcr.io/${{ github.repository }}/abi:latest
- env:
NAAS_CREDENTIALS_JWT_TOKEN: ${{ secrets.NAAS_CREDENTIALS_JWT_TOKEN }}
name: main
run: '
# Generate unique id
export SCHEDULER_ID=$(python -c "import uuid; print(uuid.uuid4())")
# Execute the Scheduler script
docker run --name $SCHEDULER_ID -i -e NAAS_CREDENTIALS_JWT_TOKEN="$NAAS_CREDENTIALS_JWT_TOKEN"
--platform linux/amd64 ghcr.io/${{ github.repository }}/abi:latest python
.github/scripts/run_scheduler.py "main"
# Create the output directory that will be used to store the output files
and save them as artifacts.
mkdir -p outputs/
# Copy the output files from the container to the host.
docker cp $SCHEDULER_ID:/app/outputs ./outputs
'
- name: Upload output artifacts
uses: actions/upload-artifact@v4
with:
name: output-files
path: ./outputs
name: Scheduler - main
'on':
schedule:
- cron: 0 9 * * *
workflow_dispatch: null