update ci actions
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: Build and Push to Digital Ocean Container Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: actions-server
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user