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:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag atridad:${{ github.sha }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to DO Container Registry
|
||||
run: doctl registry login --expiry-seconds 600
|
||||
|
||||
- name: Tag images
|
||||
run: |
|
||||
docker tag atridad:${{ github.sha }} ${{ secrets.DIGITALOCEAN_REGISTRY }}:${{ github.sha }}
|
||||
docker tag atridad:${{ github.sha }} ${{ secrets.DIGITALOCEAN_REGISTRY }}:latest
|
||||
|
||||
- name: Push images to DO Container Registry
|
||||
run: |
|
||||
docker push ${{ secrets.DIGITALOCEAN_REGISTRY }}:${{ github.sha }}
|
||||
docker push ${{ secrets.DIGITALOCEAN_REGISTRY }}:latest
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
services:
|
||||
app:
|
||||
image: registry.digitalocean.com/himboapps/atridotdad:latest
|
||||
image: ghcr.io/atridadl/atridotdad:latest
|
||||
command: ["/app"]
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
name: proxy
|
||||
external: true
|
||||
|
|
Loading…
Add table
Reference in a new issue