Files
infra-hideyoshi.com/.github/workflows/refresh-deployment.yml

36 lines
1.0 KiB
YAML

name: workflow_02
on:
repository_dispatch:
types: [refresh-deployments]
jobs:
refresh_deployment:
name: Refresh Kubernetes Deployments
environment: prod
runs-on: ubuntu-latest
timeout-minutes: 30
env:
deployments: ${{ github.event.client_payload.deployments }}
steps:
- uses: actions/checkout@v4
- name: Writing Env File
run: |
echo "${{ secrets.ENV_FILE }}" | base64 -d > .env
- name: Set Kubernetes Context
uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- name: Refresh Deployments
if: ${{ env.deployments == '' }}
run: |
./deploy.sh -f .env -r
- name: Refresh Specific Deployments
if: ${{ env.deployments != '' }}
run: |
./deploy.sh -f .env -r ${{ env.deployments }}