increase retry to 12 times to be 2m total #24
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: java pubsub quickstart | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/pubsub_java.yaml | |
- pubsub/java/** | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/workflows/pubsub_java.yaml | |
- pubsub/java/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
id-token: "write" | |
environment: shared-production | |
if: github.repository_owner == 'diagridio' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- name: build local | |
run: | | |
cd pubsub/java | |
mvn clean install -f ./publisher && mvn clean install -f ./subscriber | |
- name: Configure AWS credentials | |
if: github.event_name != 'pull_request' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ vars.AWS_CI_ROLE }} | |
aws-region: ${{ vars.AWS_CI_REGION }} | |
- name: Login to Amazon ECR | |
if: github.event_name != 'pull_request' | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
with: | |
registry-type: public | |
- name: Set up Docker Buildx | |
if: github.event_name != 'pull_request' | |
uses: docker/setup-buildx-action@v3.6.1 | |
- name: build and push publisher image | |
if: github.event_name != 'pull_request' | |
working-directory: pubsub/java/publisher | |
run: | | |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ steps.login-ecr.outputs.registry }}/${{ vars.AWS_PUBLIC_ECR_ALIAS }}/pubsub-java-publisher-qs . --push | |
- name: build and push subscriber image | |
if: github.event_name != 'pull_request' | |
working-directory: pubsub/java/subscriber | |
run: | | |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ steps.login-ecr.outputs.registry }}/${{ vars.AWS_PUBLIC_ECR_ALIAS }}/pubsub-java-subscriber-qs . --push |