33 lines
1.0 KiB
YAML
33 lines
1.0 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: 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: Login to DigitalOcean Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: registry.digitalocean.com
|
|
username: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
password: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
|
|
- 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
|