Skip to content

workflow with build and fmt #6

workflow with build and fmt

workflow with build and fmt #6

name: Development Dynamic Enviroment
on:
push:
branches: ["development"]
pull_request:
branches: ["development"]
jobs:
checkout:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
install:
runs-on: self-hosted
needs: ["checkout"]
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
fmt:
runs-on: self-hosted
needs: ["install"]
steps:
- run: npm run fmt.check
lint:
runs-on: self-hosted
needs: ["install"]
steps:
- run: npm run lint
build:
runs-on: self-hosted
needs: ["install", "fmt", "lint"]
steps:
- run: npm run build
kubeconfig:
runs-on: self-hosted
needs: ["build"]
steps:
- name: Create kubeconfig
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
run: |
mkdir -p $GITHUB_WORKSPACE/.kube
echo "$KUBE_CONFIG" | base64 --decode > $GITHUB_WORKSPACE/.kube/config
deploy:
runs-on: self-hosted
needs: ["kubeconfig"]
steps:
- name: Deploy to kubernetes
run: skaffold run --kubeconfig "$GITHUB_WORKSPACE/.kube/config" --filename "$GITHUB_WORKSPACE/dev-skaffold.yaml" --default-repo registry.internal.visoft.solutions