Skip to content

update

update #9

name: CI/CD Emerynet
on:
push
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
shell: bash
- name: Configure Docker and Authenticate with Google Cloud
run: |
echo "${{ secrets.GCP_AUTH_KEY }}" > google-credentials.json
gcloud auth configure-docker
shell: bash
- name: Login to Container Registry
run: |
echo "${{ secrets.GCP_AUTH_KEY }}" | docker login -u _json_key --password-stdin https://gcr.io
env:
DOCKER_CLI_ACI_SERVER: ${{ secrets.CONTAINER_REGISTRY_SERVER }}
shell: bash
- name: Login to Kubernetes
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
cluster-context: "gke-service-connection"
namespace: "agoric-makefile-automation"
- name: Build and push Docker images
run: |
cd frontend
export $(grep -v '^#' .env.emerynet | xargs)
envsubst < ../deployment/emerynet/workloads/config/ui-config.template.yaml > ../deployment/emerynet/workloads/config/ui-config.yaml
envsubst < skaffold.emerynet.template.yaml > skaffold.emerynet.yaml
skaffold run --filename skaffold.emerynet.yaml
shell: bash