Skip to content

Commit

Permalink
update publish wf
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed May 23, 2024
1 parent 93130d6 commit 437691c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 39 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,18 @@ jobs:
needs: generate-initial-collection-json
uses: bioimage-io/collection/.github/workflows/stage_call.yaml@main
with:
resource_id: 'frank-water-buffalo'
concept_id: 'frank-water-buffalo'
package_url: 'https://uk1s3.embassy.ebi.ac.uk/public-datasets/examples.bioimage.io/frank-water-buffalo_v1.zip'
environment_name: testing
secrets: inherit
secrets: inherit

test-publish:
needs: test-stage
uses: bioimage-io/collection/.github/workflows/publish_call.yaml@main
with:
resource_id: ${{vars.TEST_PACKAGE_ID}} # testing!
stage_number: 1
concept_id: 'frank-water-buffalo'
reviewer: 'github|${{github.actor_id}}'
S3_HOST: ${{vars.S3_HOST}}
S3_BUCKET: ${{vars.S3_TEST_BUCKET}} # testing!
S3_FOLDER: ${{vars.S3_TEST_FOLDER}}/ci # testing!
REVIEWERS: ${{vars.REVIEWERS}}
environment_name: testing
secrets: inherit

test-generate-collection-json:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@
# call:
# uses: bioimage-io/collection/.github/workflows/publish_call.yaml@main
# with:
# resource_id: ${{inputs.resource_id}}
# stage_number: ${{fromJson(inputs.stage_number)}} # wo 'fromJson' the number is given as string, see https://github.com/orgs/community/discussions/67182
# concept_id: ${{inputs.resource_id}}
# reviewer: ${{inputs.reviewer == 'auto detect' && format('github|{0}', github.actor_id) || inputs.reviewer}}
# S3_HOST: ${{vars.S3_HOST}}
# S3_BUCKET: ${{vars.S3_BUCKET}}
# S3_FOLDER: ${{inputs.sandbox && vars.S3_SANDBOX_FOLDER || vars.S3_FOLDER}}
# REVIEWERS: ${{vars.REVIEWERS}}

# environment_name: ${{inputs.sandbox && vars.S3_SANDBOX_FOLDER || vars.S3_FOLDER}}
# secrets: inherit
36 changes: 12 additions & 24 deletions .github/workflows/publish_call.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,30 @@ name: publish call
on:
workflow_call:
inputs:
resource_id:
description: "Bioimageio ID of the resource - to be used to access the resource on S3"
concept_id:
description: "Bioimageio resource concept"
required: true
type: string
stage_number:
description: stage number to publish
required: true
type: number
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
S3_HOST:
required: true
type: string
S3_BUCKET:
environment_name:
required: true
type: string
S3_FOLDER:
required: true
type: string
REVIEWERS:
required: true
type: string


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

env:
S3_HOST: ${{inputs.S3_HOST}}
S3_BUCKET: ${{inputs.S3_BUCKET}}
S3_FOLDER: ${{inputs.S3_FOLDER}}
S3_ACCESS_KEY_ID: ${{secrets.S3_ACCESS_KEY_ID}}
S3_HOST: ${{vars.S3_HOST}}
S3_BUCKET: ${{vars.S3_BUCKET}}
S3_SECRET_ACCESS_KEY: ${{secrets.S3_SECRET_ACCESS_KEY}}
ZENODO_API_ACCESS_TOKEN: ${{secrets.ZENODO_API_ACCESS_TOKEN}}
REVIEWERS: ${{inputs.REVIEWERS}}
S3_ACCESS_KEY_ID: ${{secrets.S3_ACCESS_KEY_ID}}
RUN_URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}


jobs:
run:
runs-on: ubuntu-latest
Expand All @@ -57,3 +41,7 @@ jobs:
cache: "pip" # caching pip dependencies
- run: pip install .
- run: backoffice publish "${{inputs.resource_id}}" "staged/${{inputs.stage_number}}" "${{inputs.reviewer}}"
env:
S3_FOLDER: ${{vars.S3_FOLDER}}
ZENODO_URL: ${{vars.ZENODO_URL}}
ZENODO_API_ACCESS_TOKEN: ${{secrets.ZENODO_API_ACCESS_TOKEN}}

0 comments on commit 437691c

Please sign in to comment.