Files
portal/.gitea/workflows/deploy.yaml
T

36 lines
1.1 KiB
YAML

name: Build and Push to Digital Ocean Container Registry
on:
push:
branches: [main]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install doctl
run: |
curl -sL https://github.com/digitalocean/doctl/releases/latest/download/doctl-linux-amd64.tar.gz | tar xz
sudo mv doctl /usr/local/bin
- name: Auth with DOCR
run: |
doctl auth init -t "${{ secrets.DO_TOKEN }}"
doctl registry login
- name: Build image
run: |
docker build --platform linux/amd64 \
-t registry.digitalocean.com/radiantwave-portal-container-registry/portal:${{ gitea.sha }} \
-t registry.digitalocean.com/radiantwave-portal-container-registry/portal:latest \
.
- name: Push image
run: |
docker push registry.digitalocean.com/radiantwave-portal-container-registry/portal:${{ gitea.sha }}
docker push registry.digitalocean.com/radiantwave-portal-container-registry/portal:latest