-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab2c465
commit 8974255
Showing
2 changed files
with
84 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
- version-* | ||
paths-ignore: | ||
- README.md | ||
- LICENSE | ||
- .gitignore | ||
|
||
jobs: | ||
changes: | ||
name: Collect changed files | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
app: ${{ steps.filter.outputs.app }} | ||
grpc: ${{ steps.filter.outputs.grpc }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
app: | ||
- 'gradle.properties' | ||
grpc: | ||
- 'grpc/gradle.properties' | ||
grpc-version: | ||
name: Extract gRPC version | ||
needs: | ||
- changes | ||
if: ${{ needs.changes.outputs.grpc == 'true' }} | ||
uses: th2-net/.github/.github/workflows/compound-prebuild-java-workflow.yml@main | ||
with: | ||
project-path: grpc | ||
build-and-publish-grpc-java: | ||
name: Build and publish Java gRPC distributions | ||
runs-on: 'ubuntu-20.04' | ||
needs: | ||
- changes | ||
if: ${{ needs.changes.outputs.grpc == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 'zulu' '11' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Build with Gradle | ||
run: ./gradlew --info -Pversion_suffix='dev' clean build | ||
|
||
build-and-publish-grpc-python: | ||
name: Build and publish Python distributions to PyPI | ||
needs: | ||
- build-and-publish-grpc-java | ||
- grpc-version | ||
- changes | ||
if: ${{ needs.changes.outputs.grpc == 'true' }} | ||
uses: th2-net/.github/.github/workflows/compaund-python-grpc-pypi-publication.yml@main | ||
with: | ||
custom-version: ${{ needs.grpc-version.outputs.version }}rc1 | ||
project-path: grpc | ||
|
||
publish-docker: | ||
name: Build and publish docker image | ||
if: | | ||
always() && | ||
(needs.changes.outputs.app == 'true' || needs.changes.outputs.grpc == 'true') | ||
needs: | ||
- build-and-publish-grpc-python | ||
- build-and-publish-grpc-java | ||
- app-version | ||
uses: th2-net/.github/.github/workflows/compaund-java-docker-push.yml@main | ||
with: | ||
docker-username: ${{ github.actor }} | ||
version: ${{ needs.app-version.outputs.version }}-dev | ||
versionNumber: ${{ needs.app-version.outputs.version }} | ||
dockerContext: '.' | ||
gradleParameters: '["clean", "build", "dockerPrepare"]' |