Adjusting workflows #64
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
build-maven: | |
name: Build Maven | |
uses: ./.github/workflows/build-maven.yml | |
with: | |
version: 61.${{ github.run_number }}.${{ github.run_attempt }} | |
java_version: 21 | |
java_distribution: "corretto" | |
build-docker: | |
name: Build Docker | |
uses: ./.github/workflows/build-docker.yml | |
if: github.ref == 'refs/heads/main' | |
with: | |
version: 61.${{ github.run_number }}.${{ github.run_attempt }} | |
image_name: "truemark/helloworld-java" | |
secrets: | |
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }} | |
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
docker_hub_password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
needs: [build-maven] | |
cdk-deploy-stage: | |
name: CDK deploy to Stage | |
uses: ./.github/workflows/cdk-deploy.yml | |
with: | |
environment: "stage" | |
secrets: | |
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }} | |
needs: [ build-maven ] | |
eks-deploy-stage: | |
if: github.ref == 'refs/heads/main' | |
name: EKS deploy to Stage | |
uses: ./.github/workflows/eks-deploy.yml | |
with: | |
environment: "stage" | |
version: 61.${{ github.run_number }}.${{ github.run_attempt }} | |
needs: [build-docker, cdk-deploy-stage] | |
cdk-deploy-prod: | |
name: CDK deploy to Prod | |
uses: ./.github/workflows/cdk-deploy.yml | |
with: | |
environment: "prod" | |
secrets: | |
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }} | |
needs: [ build-maven, cdk-deploy-stage ] | |
eks-deploy-prod: | |
if: github.ref == 'refs/heads/main' | |
name: EKS deploy to Prod | |
uses: ./.github/workflows/eks-deploy.yml | |
with: | |
environment: "prod" | |
version: 61.${{ github.run_number }}.${{ github.run_attempt }} | |
needs: [eks-deploy-stage, cdk-deploy-prod] | |