Skip to content

Commit

Permalink
Merge pull request #137 from thasup/dev
Browse files Browse the repository at this point in the history
ci: add manual trigger in action workflow
  • Loading branch information
thasup committed Jun 21, 2023
2 parents c7063de + e478c3a commit 3a17316
Show file tree
Hide file tree
Showing 19 changed files with 112 additions and 61 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "client/**"
- "trigger-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN}}

# give credential to k8s cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# restart deployment
- run: kubectl rollout restart deployment client-depl
5 changes: 4 additions & 1 deletion .github/workflows/deploy-expiration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "expiration/**"
- "trigger-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

# give credential to k8s cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# restart deployment
- run: kubectl rollout restart deployment expiration-depl
5 changes: 4 additions & 1 deletion .github/workflows/deploy-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "infra/**"
- "trigger-manifest.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -23,7 +26,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

# use and cliententicate doctl
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# apply deployment yaml files (k8s-prod is for production!)
- run: kubectl apply -f infra/k8s && kubectl apply -f infra/k8s-prod
5 changes: 4 additions & 1 deletion .github/workflows/deploy-order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "order/**"
- "trigger-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

# give credential to k8s cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# restart deployment
- run: kubectl rollout restart deployment order-depl
5 changes: 4 additions & 1 deletion .github/workflows/deploy-payment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "payment/**"
- "trigger-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

# give credential to k8s cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# restart deployment
- run: kubectl rollout restart deployment payment-depl
5 changes: 4 additions & 1 deletion .github/workflows/deploy-product.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "product/**"
- "trigger-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

# give credential to k8s cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# restart deployment
- run: kubectl rollout restart deployment product-depl
5 changes: 4 additions & 1 deletion .github/workflows/deploy-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "user/**"
- "trigger-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

# give credential to k8s cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-6th-cluster
- run: doctl kubernetes cluster kubeconfig save aurapan-cluster

# restart deployment
- run: kubectl rollout restart deployment user-depl
3 changes: 3 additions & 0 deletions .github/workflows/initial-deploy-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "trigger-initial-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/initial-deploy-expiration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "trigger-initial-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/initial-deploy-order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "trigger-initial-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/initial-deploy-payment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "trigger-initial-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/initial-deploy-product.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "trigger-initial-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/initial-deploy-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "trigger-initial-deploy.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/tests-order.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: tests-order

on:
pull_request:
paths:
- "order/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd order && npm install && npm run test:ci
name: tests-order

on:
pull_request:
paths:
- "order/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd order && npm install && npm run test:ci
29 changes: 16 additions & 13 deletions .github/workflows/tests-payment.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: tests-payment

on:
pull_request:
paths:
- "payment/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd payment && npm install && npm run test:ci
name: tests-payment

on:
pull_request:
paths:
- "payment/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd payment && npm install && npm run test:ci
29 changes: 16 additions & 13 deletions .github/workflows/tests-product.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: tests-product

on:
pull_request:
paths:
- "product/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd product && npm install && npm run test:ci
name: tests-product

on:
pull_request:
paths:
- "product/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd product && npm install && npm run test:ci
29 changes: 16 additions & 13 deletions .github/workflows/tests-user.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: tests-user

on:
pull_request:
paths:
- "user/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd user && npm install && npm run test:ci
name: tests-user

on:
pull_request:
paths:
- "user/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd user && npm install && npm run test:ci
2 changes: 1 addition & 1 deletion trigger-deploy.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
redeploy..
redeploy...
2 changes: 1 addition & 1 deletion trigger-manifest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
trigger..
trigger...

0 comments on commit 3a17316

Please sign in to comment.