summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2021-11-04 15:07:59 +0200
committerJan Tuomi <jan.tuomi@valuemotive.com>2021-11-04 15:08:14 +0200
commite329e6f3afeca8657ac8dbc8fb7f48a6f19d9522 (patch)
tree198f9987eddeb412e516a66928cff1c4333e6612
parent56be711ee89a86c7ba7c01a361163823b1056e16 (diff)
Add CI
-rw-r--r--.github/workflows/somebook.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/somebook.yml b/.github/workflows/somebook.yml
new file mode 100644
index 0000000..b59293e
--- /dev/null
+++ b/.github/workflows/somebook.yml
@@ -0,0 +1,34 @@
+name: Build and Push
+
+on:
+ push:
+ branches:
+ - main
+
+env:
+ IMAGE: registry.digitalocean.com/jan-systems-registry/somebook:latest
+ DO_DOCKER_LOGIN: ${{ secrets.DO_DOCKER_LOGIN }}
+
+jobs:
+ website:
+ name: Build and Push
+ runs-on: ubuntu-latest
+ environment:
+ name: production
+ url: https://book.jan.systems
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ # Login to Digitalocean registry
+ - name: Log in to Digitalocean registry
+ run: docker login -u ${DO_DOCKER_LOGIN} -p ${DO_DOCKER_LOGIN} registry.digitalocean.com
+
+ # Build the Docker image
+ - name: Build image
+ run: docker build -t ${IMAGE} .
+
+ # Push the Docker image to Google Container Registry
+ - name: Push image to registry
+ run: docker push ${IMAGE}