prod test #9
This file contains hidden or 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: Create Dev Release | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - adding-report-server-gha | |
| concurrency: | |
| cancel-in-progress: true | |
| group: report-server-build-app-dev | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| # build: | |
| # name: Docker Build and Push | |
| # uses: ./.github/workflows/_build.yaml | |
| # permissions: | |
| # id-token: write | |
| # contents: read | |
| # with: | |
| # tag-name: dev | |
| deploy-dev: | |
| name: Deploy to Dev | |
| # needs: [ build ] | |
| secrets: inherit | |
| uses: ./.github/workflows/_deploy.yaml | |
| permissions: | |
| contents: read | |
| id-token: write | |
| with: | |
| image-tag: dev | |
| env-name: prod | |
| # Deploy: | |
| # needs: App_Build | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: configure aws credentials | |
| # uses: aws-actions/configure-aws-credentials@v4 | |
| # with: | |
| # role-to-assume: arn:aws:iam::017925157769:role/cmiml-dev-oidc-github-role | |
| # role-session-name: OIDC-GHA-session | |
| # aws-region: us-east-1 | |
| # | |
| # - name: Download task definition | |
| # run: | | |
| # aws ecs describe-task-definition --task-definition report_server --query taskDefinition > task-definition.json | |
| # | |
| # - name: Render Amazon ECS task definition | |
| # id: task-def | |
| # uses: aws-actions/amazon-ecs-render-task-definition@v1 | |
| # with: | |
| # task-definition: task-definition.json | |
| # container-name: report_server | |
| # image: ${{ needs.App_Build.outputs.image }} | |
| # | |
| # - name: Update Task Definition | |
| # uses: aws-actions/amazon-ecs-deploy-task-definition@v1 | |
| # with: | |
| # task-definition: ${{ steps.task-def.outputs.task-definition }} | |
| # service: report-server | |
| # cluster: cmiml-dev | |
| # wait-for-service-stability: true | |
| # | |
| # Failed-Notification: | |
| # needs: | |
| # - App_Build | |
| # - Deploy | |
| # if: failure() | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # | |
| # - name: Format Slack Message (Failed) | |
| # if: failure() | |
| # run: | | |
| # sed -i "s|\${APP}|Report Server|g" .github/configs/failed_deploy.json | |
| # sed -i "s|\${ENVIRONMENT}|dev|g" .github/configs/failed_deploy.json | |
| # sed -i "s|\${IMAGE}|${{ needs.App_Build.outputs.short-image }}|g" .github/configs/failed_deploy.json | |
| # | |
| # echo JSON_PAYLOAD=$(cat .github/configs/failed_deploy.json) >> $GITHUB_ENV | |
| # shell: bash | |
| # - name: Send Slack Message | |
| # uses: slackapi/[email protected] | |
| # with: | |
| # payload: | | |
| # ${{ env.JSON_PAYLOAD }} | |
| # env: | |
| # SLACK_WEBHOOK_URL: ${{ secrets.CODE_GURU_REPORTS_WEBHOOK }} | |
| # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
| # | |
| # Success-Notification: | |
| # needs: | |
| # - App_Build | |
| # - Deploy | |
| # if: success() | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # | |
| # - name: Format Slack Message (Success) | |
| # run: | | |
| # sed -i "s|\${APP}|Report Server|g" .github/configs/successful_deploy.json | |
| # sed -i "s|\${ENVIRONMENT}|dev|g" .github/configs/successful_deploy.json | |
| # sed -i "s|\${IMAGE}|${{ needs.App_Build.outputs.short-image }}|g" .github/configs/successful_deploy.json | |
| # | |
| # echo JSON_PAYLOAD=$(cat .github/configs/successful_deploy.json) >> $GITHUB_ENV | |
| # shell: bash | |
| # - name: Send Slack Message | |
| # uses: slackapi/[email protected] | |
| # with: | |
| # payload: | | |
| # ${{ env.JSON_PAYLOAD }} | |
| # env: | |
| # SLACK_WEBHOOK_URL: ${{ secrets.CODE_GURU_REPORTS_WEBHOOK }} | |
| # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |