diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-09-27 14:37:30 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-09-27 14:37:30 +0300 |
| commit | 4d60c2f54fe9779ad007230d5ecf1c976efe1a00 (patch) | |
| tree | 2d0f33eef9cab25bd6fd4d46b273327b650a7192 | |
| parent | e5f64574f890de462c01fed864356660d92a26a4 (diff) | |
Use self-hosted registry
| -rw-r--r-- | .github/workflows/jan-systems-website.yml | 34 | ||||
| -rwxr-xr-x | build-and-push.sh | 7 |
2 files changed, 7 insertions, 34 deletions
diff --git a/.github/workflows/jan-systems-website.yml b/.github/workflows/jan-systems-website.yml deleted file mode 100644 index 023a769..0000000 --- a/.github/workflows/jan-systems-website.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Deploy website to GCP - -on: - push: - branches: - - main - -env: - IMAGE: registry.digitalocean.com/jan-systems-registry/jan-systems-website:latest - DO_DOCKER_LOGIN: ${{ secrets.DO_DOCKER_LOGIN }} - -jobs: - website: - name: Build and Push - runs-on: ubuntu-latest - environment: - name: production - url: https://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} diff --git a/build-and-push.sh b/build-and-push.sh new file mode 100755 index 0000000..ae3f04b --- /dev/null +++ b/build-and-push.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +IMAGE=registry.jan.systems/jan-systems-website:latest + +set -euxo pipefail +docker build --platform linux/amd64 -t $IMAGE . +docker push $IMAGE |
