Add CI through GitHub Actions

This commit is contained in:
Eric Zhang 2021-06-01 13:32:46 -05:00
parent 2fe698824e
commit 7213e04b96

35
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: CI
on:
push:
branches:
- main
jobs:
docker:
name: Docker Build and Push
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry
run: doctl registry login
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: registry.digitalocean.com/ekzhang/rustpad:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}