forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2366 from matter-labs/remove-hubot
Test wf dispatch instead of hubot
- Loading branch information
Showing
1 changed file
with
68 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,83 @@ | ||
name: Deploy from Chat | ||
name: Deploy from tag | ||
|
||
on: | ||
deployment: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: "Environment to deploy." | ||
required: true | ||
type: choice | ||
options: | ||
- goerli | ||
- mainnet | ||
|
||
|
||
# Disable simultaneous deployments into a single environment | ||
concurrency: deploy-chat-${{ github.event.deployment.environment }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup: | ||
name: Setup | ||
uses: ./.github/workflows/setup.runtime.yml | ||
with: | ||
find-latest-config: true | ||
environment: ${{ github.event.deployment.environment }} | ||
environment: ${{ inputs.environment }} | ||
secrets: | ||
github-token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }} | ||
echo-vars: | ||
needs: Setup | ||
runs-on: [self-hosted, default, infra] | ||
name: "echo vars" | ||
steps: | ||
- run: | ||
echo "cluster - ${{ needs.setup.outputs.cluster }}" | ||
echo "config-tag -${{ needs.setup.outputs.config-tag }}" | ||
echo "environment -${{ needs.setup.outputs.environment }}" | ||
echo "release-namespace -${{ needs.setup.outputs.release-namespace }}" | ||
echo "deployment- id -${{ github.event.deployment.id }}" | ||
echo "sha-short -${{ needs.setup.outputs.sha-short }}" | ||
|
||
update: | ||
name: Update | ||
uses: ./.github/workflows/server.update-config.yml | ||
needs: [setup] | ||
with: | ||
ref: ${{ needs.setup.outputs.config-tag }} | ||
cluster: ${{ needs.setup.outputs.cluster }} | ||
environment: ${{ needs.setup.outputs.environment }} | ||
namespace: ${{ needs.setup.outputs.release-namespace }} | ||
secrets: | ||
github-token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }} | ||
# update: | ||
# name: Update | ||
# uses: ./.github/workflows/server.update-config.yml | ||
# needs: [setup] | ||
# with: | ||
# ref: ${{ needs.setup.outputs.config-tag }} | ||
# cluster: ${{ needs.setup.outputs.cluster }} | ||
# environment: ${{ needs.setup.outputs.environment }} | ||
# namespace: ${{ needs.setup.outputs.release-namespace }} | ||
# secrets: | ||
# github-token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }} | ||
|
||
deploy: | ||
name: Deploy | ||
uses: ./.github/workflows/deploy.yml | ||
needs: [setup, update] | ||
with: | ||
cluster: ${{ needs.setup.outputs.cluster }} | ||
environment: ${{ needs.setup.outputs.environment }} | ||
release-environment: ${{ needs.setup.outputs.release-environment }} | ||
release-namespace: ${{ needs.setup.outputs.release-namespace }} | ||
deployment-id: ${{ github.event.deployment.id }} | ||
image-tag: ${{ needs.setup.outputs.sha-short }} | ||
secrets: | ||
github-token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }} | ||
# deploy: | ||
# name: Deploy | ||
# uses: ./.github/workflows/deploy.yml | ||
# needs: [setup, update] | ||
# with: | ||
# cluster: ${{ needs.setup.outputs.cluster }} | ||
# environment: ${{ needs.setup.outputs.environment }} | ||
# release-environment: ${{ needs.setup.outputs.release-environment }} | ||
# release-namespace: ${{ needs.setup.outputs.release-namespace }} | ||
# deployment-id: ${{ github.event.deployment.id }} | ||
# image-tag: ${{ needs.setup.outputs.sha-short }} | ||
# secrets: | ||
# github-token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }} | ||
|
||
notify: | ||
runs-on: ubuntu-latest | ||
needs: [deploy] | ||
if: always() && !cancelled() | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@482bb0dbebad067b3b26ca4f6222c4023cf51ccf # v2 | ||
- | ||
name: Notify to Mattermost (on incidents) | ||
uses: tferreira/matterfy@releases/v1 | ||
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }} | ||
with: | ||
type: failure | ||
job_name: '*Deploy to `${{ needs.setup.outputs.environment }}` failed*' | ||
icon_emoji: octocat | ||
channel: 'ci-notifications' | ||
url: ${{ secrets.MATTERMOST_WEBHOOK }} | ||
# notify: | ||
# runs-on: ubuntu-latest | ||
# needs: [deploy] | ||
# if: always() && !cancelled() | ||
# steps: | ||
# - uses: technote-space/workflow-conclusion-action@482bb0dbebad067b3b26ca4f6222c4023cf51ccf # v2 | ||
# - | ||
# name: Notify to Mattermost (on incidents) | ||
# uses: tferreira/matterfy@releases/v1 | ||
# if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }} | ||
# with: | ||
# type: failure | ||
# job_name: '*Deploy to `${{ needs.setup.outputs.environment }}` failed*' | ||
# icon_emoji: octocat | ||
# channel: 'ci-notifications' | ||
# url: ${{ secrets.MATTERMOST_WEBHOOK }} |