Github Repo
This commit is contained in:
parent
93b7b9ed68
commit
e063a906d2
2 changed files with 16 additions and 25 deletions
32
.github/workflows/docker.yml
vendored
32
.github/workflows/docker.yml
vendored
|
@ -12,23 +12,21 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build the Docker image
|
- name: Set up Docker Buildx
|
||||||
run: docker build . --file Dockerfile --tag atridad:${{ github.sha }}
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Install doctl
|
- name: Login to GitHub Container Registry
|
||||||
uses: digitalocean/action-doctl@v2
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Log in to DO Container Registry
|
- name: Build and push
|
||||||
run: doctl registry login --expiry-seconds 600
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
- name: Tag images
|
context: .
|
||||||
run: |
|
push: true
|
||||||
docker tag atridad:${{ github.sha }} ${{ secrets.DIGITALOCEAN_REGISTRY }}:${{ github.sha }}
|
tags: |
|
||||||
docker tag atridad:${{ github.sha }} ${{ secrets.DIGITALOCEAN_REGISTRY }}:latest
|
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||||
|
ghcr.io/${{ github.repository }}:latest
|
||||||
- name: Push images to DO Container Registry
|
|
||||||
run: |
|
|
||||||
docker push ${{ secrets.DIGITALOCEAN_REGISTRY }}:${{ github.sha }}
|
|
||||||
docker push ${{ secrets.DIGITALOCEAN_REGISTRY }}:latest
|
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: registry.digitalocean.com/himboapps/atridotdad:latest
|
image: ghcr.io/atridadl/atridotdad:latest
|
||||||
command: ["/app"]
|
command: ["/app"]
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
networks:
|
|
||||||
- proxy
|
|
||||||
|
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
name: proxy
|
|
||||||
external: true
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue