Skip to content

Update tests.yml (#506) #7

Update tests.yml (#506)

Update tests.yml (#506) #7

name: Package Release
on:
push:
branches:
- master
- main
- dev
permissions:
contents: write
jobs:
package-filter:
name: Filter for updated package
if: github.repository == 'polusai/polus-plugins'
uses: ./.github/workflows/package-filter.yml
package-release:
name: Release "${{ matrix.package_name }}"
if: github.repository == 'polusai/polus-plugins'
needs: package-filter
strategy:
matrix: ${{fromJson(needs.package-filter.outputs.matrix)}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install bump2version
run: |
python -m pip install --upgrade pip
pip install bump2version
- name: Bump Version
run: |
cd "${{ matrix.package_dir }}"
bump2version release --no-commit
- name: Commit and push all changed files
env:
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git commit -a -m "build: Bumped release version for ${{ matrix.package_name }}"
git push
docker:
name: Build Docker images
if: github.repository == 'polusai/polus-plugins'
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 }}