update #5
Workflow file for this run
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
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: Download Service Account Key | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/authkey | |
echo "${{ secrets.GCP_AUTH_KEY }}" > $GITHUB_WORKSPACE/authkey/google-credentials.json | |
shell: bash | |
- name: Set Google Cloud Credentials | |
run: | | |
export GOOGLE_APPLICATION_CREDENTIALS="$GITHUB_WORKSPACE/authkey/google-credentials.json" | |
shell: bash | |
- name: Configure Docker to Authenticate with Google Cloud | |
run: | | |
gcloud auth configure-docker | |
shell: bash | |
- name: Login to Container Registry | |
run: echo "$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 |