added test action with github app #9
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
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 "username@users.noreply.github.com" | |
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 }} | |
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 }} |