Skip to content

Commit

Permalink
add request_changes wfs
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Mar 3, 2024
1 parent c469505 commit e0370f2
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/request_changes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: request changes

on:
workflow_dispatch:
inputs:
resource_id:
description: "Bioimageio ID of the resource - to be used to access the resource on S3"
required: true
type: string
stage_nr:
description: stage nr
required: true
type: number
reason:
description: Why are changes required? What needs changing?
required: true
type: string

concurrency: ${{inputs.resource_id}}

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}}

jobs:
call:
uses: ./.github/workflows/request_changes_call.yaml
with:
resource_id: ${{inputs.resource_id}}
stage_nr: ${{inputs.stage_nr}}
reason: ${{inputs.reason}}
S3_HOST: ${{vars.S3_HOST}}
S3_BUCKET: ${{vars.S3_BUCKET}}
S3_FOLDER: ${{vars.S3_FOLDER}}
ZENODO_URL: ${{vars.ZENODO_URL}}
secrets: inherit
52 changes: 52 additions & 0 deletions .github/workflows/request_changes_call.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: request changes call

on:
workflow_call:
inputs:
resource_id:
description: "Bioimageio ID of the resource - to be used to access the resource on S3"
required: true
type: string
stage_nr:
description: stage nr
required: true
type: number
reason:
description: Why are changes required? What needs changing?
required: true
type: string
S3_HOST:
required: true
type: string
S3_BUCKET:
required: true
type: string
S3_FOLDER:
required: true
type: string
ZENODO_URL:
required: true
type: string

concurrency: ${{inputs.resource_id}}-call

env:
S3_HOST: ${{inputs.S3_HOST}}
S3_BUCKET: ${{inputs.S3_BUCKET}}
S3_FOLDER: ${{inputs.S3_FOLDER}}
ZENODO_URL: ${{inputs.ZENODO_URL}}
S3_ACCESS_KEY_ID: ${{secrets.S3_ACCESS_KEY_ID}}
S3_SECRET_ACCESS_KEY: ${{secrets.S3_SECRET_ACCESS_KEY}}
ZENODO_API_ACCESS_TOKEN: ${{secrets.ZENODO_API_ACCESS_TOKEN}}

jobs:
request-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip" # caching pip dependencies
- run: pip install .
- run: backoffice request-changes "${{ inputs.resource_id }}" "${{ inputs.stage_nr }}" "${{ inputs.reason }}"

0 comments on commit e0370f2

Please sign in to comment.