-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (43 loc) · 1.64 KB
/
publish_call.yaml
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
name: publish call
on:
workflow_call:
inputs:
concept_id:
description: "Bioimageio resource concept"
required: true
type: string
reviewer:
description: GitHub user id (prefixed with 'github|') of the bioimage.io maintainer accepting this resource version
required: false
default: 'github|${{github.actor_id}}'
type: string
environment_name:
required: true
type: string
concurrency: ${{inputs.environment_name}}-${{inputs.concept_id}}-call
jobs:
run:
runs-on: ubuntu-latest
environment: ${{inputs.environment_name}}
steps:
- name: reject reviewer '${{inputs.reviewer}}'
run: exit 1
if: github.actor != 'bioimageiobot' && format('github|{0}', github.actor_id) != inputs.reviewer
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip" # caching pip dependencies
- run: pip install .
- run: backoffice publish "${{inputs.concept_id}}" --reviewer="${{inputs.reviewer}}"
env:
S3_HOST: ${{vars.S3_HOST}}
S3_BUCKET: ${{vars.S3_BUCKET}}
S3_FOLDER: ${{vars.S3_FOLDER}}
S3_ACCESS_KEY_ID: ${{secrets.S3_ACCESS_KEY_ID}}
S3_SECRET_ACCESS_KEY: ${{secrets.S3_SECRET_ACCESS_KEY}}
ZENODO_URL: ${{vars.ZENODO_URL}}
ZENODO_API_ACCESS_TOKEN: ${{secrets.ZENODO_API_ACCESS_TOKEN}}
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}
RUN_URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
BIOIMAGEIO_USER_ID: github|${{github.actor_id}}