Skip to content

Commit

Permalink
Added conditions for deploy tag workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrst88 committed Jun 7, 2023
1 parent b97c711 commit e3a8551
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/deploy.tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,25 @@ jobs:
secrets:
github-token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

update-config-validation:
runs-on: [self-hosted, stage]
needs: setup
outputs:
skip: ${{ steps.validation.outputs.skip }}
steps:
- name: Validation
id: validation
run: |
if [ ${{ needs.setup.outputs.config-tag }} == "" ]; then
echo "::set-output name=skip::true"
fi
update:
name: Update
uses: ./.github/workflows/server.update-config.yml
needs: [setup]
if: needs.setup.outputs.config-tag != ''
needs: [setup, update-config-validation]
with:
skip-update: ${{ needs.update-config-validation.outputs.skip }}
ref: ${{ needs.setup.outputs.config-tag }}
cluster: ${{ needs.setup.outputs.cluster }}
environment: ${{ needs.setup.outputs.environment }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/server.update-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ on:
required: false
type: boolean
default: false
skip-update:
description: Skip Config Update.
required: false
type: boolean
default: false
secrets:
github-token:
description: GitHub token
Expand All @@ -37,6 +42,7 @@ concurrency: server-update-config-${{ inputs.environment }}

jobs:
update:
if: inputs.skip-update
name: configMap (server-env-custom)
runs-on: [self-hosted, deployer, "${{ inputs.cluster }}"]
container:
Expand Down

0 comments on commit e3a8551

Please sign in to comment.