Skip to content

Commit a53dcd6

Browse files
committed
add dispatchable workflows skipping mechanism
1 parent 5d4d5f8 commit a53dcd6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/terraform.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@ on:
44
# branches:
55
# - main
66
workflow_dispatch:
7+
inputs:
8+
run_terraform:
9+
description: 'Run Terraform job'
10+
required: false
11+
default: 'true'
12+
run_ansible:
13+
description: 'Run Ansible job'
14+
required: false
15+
default: 'true'
16+
run_teleport:
17+
description: 'Run Teleport job'
18+
required: false
19+
default: 'true'
720

821
jobs:
922
terraform:
23+
if: ${{ github.event.inputs.run_terraform =! 'false' }}
1024
runs-on: ubuntu-latest
1125
env:
1226
TF_TOKEN_app_terraform_io: ${{ secrets.TF_TOKEN_APP_TERRAFORM_IO }}
@@ -101,6 +115,7 @@ jobs:
101115
102116
103117
ansible:
118+
if: ${{ github.event.inputs.run_ansible != 'false' }}
104119
name: Ansible Kubernetes Deployment
105120
runs-on: ubuntu-latest
106121
needs: terraform
@@ -140,6 +155,7 @@ jobs:
140155
141156
142157
teleport:
158+
if: ${{ github.event.inputs.run_teleport != 'false' }}
143159
name: Install and setup Teleport with github
144160
runs-on: ubuntu-latest
145161
needs: ansible

0 commit comments

Comments
 (0)