-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated github actions and the ome-converter plugin (#509)
* feat: updated and fixed ome-converter build: bumped version 0.3.0 -> 0.3.1 on ome converter plugin build: updated ome-converter dep on bfio to 2.3.3 bumped version fix: fp usage fix: returning after preview feat: using preadator feat: using preadator fix: new pre-commit hooks ci: updated pre-commit config to check test files fix: fixed all tests * Bump version: 0.3.0 → 0.3.1-dev0 * ci: filter action now feetches from forks * ci: making test and release workflows callable * ci: testing base ref in git actions * ci: improved package-filter * ci: updated tests and release workflows * ci: fixed tests workflow * ci: fixed release workflow
- Loading branch information
Showing
17 changed files
with
375 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,80 @@ | ||
name: Package Release | ||
|
||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- dev | ||
workflow_dispatch: | ||
inputs: | ||
num-commits: | ||
description: "The of commits to check for updated packages. If 0, the action will check all commits on the branch. For any larger value, the action will check the last n commits for any updated packages." | ||
required: true | ||
default: 1 | ||
type: number | ||
repo_name: | ||
description: 'Name of the base repository. The user can ignore this input if the action is triggered from the base repository.' | ||
required: true | ||
type: string | ||
default: 'image-tools' | ||
workflow_call: | ||
inputs: | ||
repo_name: | ||
description: 'Name of the base repository' | ||
required: true | ||
type: string | ||
num-commits: | ||
description: "The of commits to check for updated packages. If 0, the action will check all commits on the master branch. For any larger value, the action will check the last n commits for any updated packages." | ||
required: true | ||
default: 1 | ||
type: number | ||
secrets: | ||
DOCKER_USERNAME: | ||
description: 'Docker Hub username' | ||
required: true | ||
DOCKER_TOKEN: | ||
description: 'Docker Hub password' | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
package-filter: | ||
name: Filter for updated package | ||
if: github.repository == 'polusai/polus-plugins' | ||
if: github.repository == 'polusai/${{ github.event.inputs.repo_name }}' | ||
uses: ./.github/workflows/package-filter.yml | ||
with: | ||
num-commits: ${{ fromJson(github.event.inputs.num-commits) }} | ||
|
||
package-release: | ||
name: Release "${{ matrix.package_name }}" | ||
if: github.repository == 'polusai/polus-plugins' | ||
if: github.repository == 'polusai/${{ github.event.inputs.repo_name }}' | ||
needs: package-filter | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJson(needs.package-filter.outputs.matrix)}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.inputs.branch }} | ||
persist-credentials: false | ||
- name: Generate a token | ||
id: generate_token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- name: Use the token | ||
env: | ||
GH_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
run: | | ||
gh api octocat | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Install bump2version | ||
|
@@ -38,27 +85,28 @@ jobs: | |
run: | | ||
cd "${{ matrix.package_dir }}" | ||
bump2version release --no-commit | ||
- name: Commit and push all changed files | ||
- name: Commit all changed files | ||
env: | ||
CI_COMMIT_AUTHOR: Continuous Integration | ||
CI_COMMIT_AUTHOR: polusai-auth-helper[bot] | ||
CI_COMMIT_EMAIL: ${{ secrets.APP_ID }}+polusai-auth-helper[bot]@users.noreply.github.com | ||
run: | | ||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | ||
git config --global user.email "[email protected]" | ||
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" | ||
git commit -a -m "build: Bumped release version for ${{ matrix.package_name }}" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.CI_TOKEN }} | ||
branch: ${{ github.ref }} | ||
force: true | ||
github_token: ${{ steps.generate_token.outputs.token }} | ||
|
||
docker: | ||
name: Build Docker images | ||
if: github.repository == 'polusai/polus-plugins' | ||
if: github.repository == 'polusai/${{ github.event.inputs.repo_name }}' | ||
needs: [package-filter, package-release] | ||
uses: ./.github/workflows/docker.yml | ||
with: | ||
matrix: ${{ needs.package-filter.outputs.matrix }} | ||
push: true | ||
secrets: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.