Skip to content

Build latest from main and Auto-Deploy #154

Build latest from main and Auto-Deploy

Build latest from main and Auto-Deploy #154

Workflow file for this run

name: Build latest from main and Auto-Deploy
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
environment: preview
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Log into Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/mlibrary/${{ secrets.IMAGE_NAME }}:dreadful
ghcr.io/mlibrary/${{ secrets.IMAGE_NAME }}:${{ github.sha }}
deploy-preview:
needs: build
runs-on: ubuntu-latest
environment: preview
steps:
- name: Deploy to Preview
uses: mlibrary/deploy-to-kubernetes@v1
with:
github_username: ${{ github.actor }}
github_token: ${{ secrets.GITHUB_TOKEN }}
image: mlibrary/${{ secrets.IMAGE_NAME }}:${{ github.sha }}
cluster_ca: ${{ secrets.HATCHER_CLUSTER_CA }}
cluster_server: https://hatcher.kubernetes.lib.umich.edu
namespace_token: ${{ secrets.HATCHER_TOKEN }}
namespace: ${{ secrets.NAMESPACE }}