Merge pull request #4 from truemark/fixing-rollback #85
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 | ||
- hotfix/* | ||
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' || startsWith(github.ref, 'refs/heads/hotfix/') | ||
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] | ||
diff-stage: | ||
name: CDK diff to Stage | ||
uses: ./.github/workflows/diff.yml | ||
# with: | ||
# environment: "stage" | ||
# secrets: | ||
# aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }} | ||
needs: [ build-maven ] | ||
deploy-stage: | ||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') | ||
name: Deploy to Stage | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
environment: "stage" | ||
needs: [cdk-deploy-stage, docker-build] | ||
cdk-deploy-prod: | ||
name: CDK deploy to Prod | ||
uses: ./.github/workflows/cdk-deploy.yml | ||
Check failure on line 47 in .github/workflows/build.yml
|
||
with: | ||
environment: "prod" | ||
secrets: | ||
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }} | ||
needs: [diff-stage, build-docker] | ||
eks-deploy-prod: | ||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') | ||
name: Deploy to Prod | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
environment: "prod" | ||
needs: [cdk-deploy-prod] | ||
secrets: | ||
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }} |