From 87a756d1a74bab14f1d095b1e5c4f6d7c4cd43f4 Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Mon, 1 Jul 2024 16:35:56 -0500 Subject: [PATCH] Deploy staging with action --- .github/workflows/deploy_staging.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy_staging.yml diff --git a/.github/workflows/deploy_staging.yml b/.github/workflows/deploy_staging.yml new file mode 100644 index 00000000..5caf7666 --- /dev/null +++ b/.github/workflows/deploy_staging.yml @@ -0,0 +1,44 @@ +name: Deploy to Staging + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build_and_push_image: + name: Build and Push Image + uses: zooniverse/ci-cd/.github/workflows/build_and_push_image.yaml@main + with: + repo_name: aggregation-for-caesar + commit_id: ${{ github.sha }} + latest: true + build_args: "REVISION=${{ github.sha }}" + + deploy_staging: + name: Deploy to Staging + uses: zooniverse/ci-cd/.github/workflows/deploy_app.yaml@main + needs: build_and_push_image + with: + app_name: aggregation + repo_name: aggregation-for-caesar + commit_id: ${{ github.sha }} + environment: staging + deploy_check: false + secrets: + creds: ${{ secrets.AZURE_AKS }} + + slack_notification: + name: Slack notification + uses: zooniverse/ci-cd/.github/workflows/slack_notification.yaml@main + needs: deploy_staging + if: always() + with: + commit_id: ${{ github.sha }} + job_name: Deploy to Staging / deploy_app + status: ${{ needs.deploy_staging.result }} + title: "Aggregation Staging deploy complete" + title_link: "https://aggregation-staging.zooniverse.org" + secrets: + slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}