Skip to content

Commit

Permalink
[github-actions] remove conditional job execution
Browse files Browse the repository at this point in the history
  • Loading branch information
dennybaa committed Jun 24, 2021
1 parent 9e122eb commit 9d54f4a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
name: Deploy Apps
runs-on: [k8s, deployer, "${{ needs.pre.outputs.runner }}"]
needs: pre
if: ${{ needs.pre.outputs.isTag == 'true' }}

container:
image: dysnix/kubectl:v1.19-gcloud
Expand All @@ -80,9 +79,11 @@ jobs:

steps:
-
if: ${{ needs.pre.outputs.isTag == 'true' }}
name: Create ~/.kube/config
run: mkdir -p ~/.kube && echo "$KUBECONF" | base64 -d > ~/.kube/config
-
if: ${{ needs.pre.outputs.isTag == 'true' }}
name: Clone helm-infra
uses: actions/checkout@v2
with:
Expand All @@ -91,6 +92,7 @@ jobs:
ref: master
token: ${{ secrets.GH_TOKEN }}
-
if: ${{ needs.pre.outputs.isTag == 'true' }}
name: Deploy apps
working-directory: helm-infra
run: |
Expand All @@ -100,25 +102,25 @@ jobs:
UPDATE_REPOS=y helmfile -e $HFENV repos
helmfile -e $HFENV $DEPLOY_APPS apply --args "timeout 180s"
-
if: success() && needs.pre.outputs.isTag == 'true'
name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ github.token }}
state: success
deployment_id: ${{ github.event.deployment.id }}
-
if: failure() && needs.pre.outputs.isTag == 'true'
name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ github.token }}
state: failure
deployment_id: ${{ github.event.deployment.id }}
-
if: failure() && needs.pre.outputs.isTag == 'true'
name: Notify to Mattermost (on failure)
uses: tferreira/matterfy@releases/v1
if: failure()
with:
type: ${{ job.status }}
job_name: '*Deployment to "${{ github.event.deployment.environment }}" failed*'
Expand Down

0 comments on commit 9d54f4a

Please sign in to comment.