Skip to content

Commit

Permalink
Merge pull request #2372 from matter-labs/set-if-wg
Browse files Browse the repository at this point in the history
Added conditions for deploy tag workflow
  • Loading branch information
alexandrst88 authored Jun 7, 2023
2 parents b435295 + 762e958 commit 26fa69d
Show file tree
Hide file tree
Showing 2 changed files with 23 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
8 changes: 8 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 Down Expand Up @@ -57,11 +62,13 @@ jobs:
token: ${{ secrets.github-token }}
-
name: Generate ~/.kube/config
if: inputs.skip-update
working-directory: gh-workflows
run: scripts/kubeconfig-projected-token
-
name: Clone configs
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
if: inputs.skip-update
with:
repository: matter-labs/configs
path: configs
Expand All @@ -70,6 +77,7 @@ jobs:
-
name: Update Server Config
working-directory: configs
if: inputs.skip-update
run: |
sudo apk --no-cache add yarn
./bin/config
Expand Down

0 comments on commit 26fa69d

Please sign in to comment.