|
@@ -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 }}
|