Skip to content

Commit 6f5aab8

Browse files
committed
Update docker workflow
1 parent 9e13028 commit 6f5aab8

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/docker.yml

+19-8
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,26 @@ on:
88

99
jobs:
1010
postgres-backup:
11-
runs-on: self-hosted
11+
runs-on: ubuntu-latest
1212
steps:
13-
- uses: TooMuch4U/actions-clean@v2.1
1413
- uses: actions/checkout@v3
1514

16-
- run: |
17-
docker build -f ./Dockerfile \
18-
-t twirapp/postgres-backup:latest \
19-
--cache-from type=gha,scope=twir-postgres-backup \
20-
--cache-to type=gha,mode=max,scope=twir-postgres-backup .
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
2117

22-
docker push twirapp/postgres-backup:latest
18+
- name: Login to Twir registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: registry.twir.app
22+
username: ${{ secrets.DOCKER_TWIR_LOGIN }}
23+
password: ${{ secrets.DOCKER_TWIR_PASSWORD }}
24+
25+
- name: Build docker image
26+
uses: docker/build-push-action@v5
27+
with:
28+
context: .
29+
file: ./Dockerfile
30+
push: true
31+
tags: registry.twir.app/twirapp/${{ env.app }}:latest
32+
cache-from: type=gha
33+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)