Skip to content

.github/workflows/deploy.yaml #144

.github/workflows/deploy.yaml

.github/workflows/deploy.yaml #144

Workflow file for this run

on:
workflow_run:
workflows: [.github/workflows/build.yaml]
types: [completed]
workflow_dispatch:
inputs:
environment:
description: 'environment to deploy'
required: true
type: environment
jobs:
deploy:
environment: ${{ inputs.environment || 'goerli' }}
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
env:
IMAGE_TAG: ${{ format('gcr.io/exactly-liq-bot/liquidation-bot:{0}', github.sha) }}
steps:
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
- uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: exactly
location: us-central1
- run: kubectl set image deployment/${{ inputs.environment || 'goerli' }} liquidation-bot=${{ env.IMAGE_TAG }}