Create dummy #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# GitHub Actions workflow. | |
# | |
# Automatically deploys the Node.js microservice to Kubernetes on push to any branch. | |
# For real use you might want to restrict this to the "prod" branch. | |
# | |
name: Deploy microservice | |
on: | |
# | |
# Deploys the microservice on push to the main branch of this code repository. | |
# | |
push: | |
branches: | |
- main | |
# | |
# Allows deployment to be invoked manually through the GitHub Actions user interface. | |
# | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
VERSION: ${{ github.sha }} | |
CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }} | |
REGISTRY_UN: ${{ secrets.REGISTRY_UN }} | |
REGISTRY_PW: ${{ secrets.REGISTRY_PW }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE. | |
- uses: actions/checkout@v3 | |
# | |
# Builds the Docker image. | |
# | |
- name: Build | |
run: ./scripts/build-image.sh | |
# | |
# Publishes the Docker image to the container registry. | |
# | |
- name: Publish | |
run: ./scripts/push-image.sh | |
# | |
# Installs Kubectl and connects it to the cluster. | |
# | |
# https://github.com/marketplace/actions/kubernetes-cli-kubectl | |
# | |
- uses: tale/kubectl-action@v1 | |
with: | |
base64-kube-config: ${{ secrets.KUBE_CONFIG }} | |
kubectl-version: v1.24.2 | |
# | |
# Expands the configuration template and deploys the microservice. | |
# | |
- name: Deploy | |
run: ./scripts/deploy.sh |