Skip to content

Commit de8c940

Browse files
committed
fix(ci): login to docker hub in pr
1 parent 1da1737 commit de8c940

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/pr.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- "master"
77

8+
env:
9+
IMAGE_NAME: "nventiveux/syncthing"
10+
DOCKER_BUILDKIT: "1"
11+
812
jobs:
913
lint:
1014
name: "Linting"
@@ -34,6 +38,12 @@ jobs:
3438
with:
3539
install: true
3640

41+
- name: "Login to DockerHub"
42+
uses: "docker/login-action@v2"
43+
with:
44+
username: "${{ secrets.DOCKER_USERNAME }}"
45+
password: "${{ secrets.DOCKER_PASSWORD }}"
46+
3747
- name: "Build images"
3848
uses: "docker/build-push-action@v3"
3949
with:
@@ -42,4 +52,4 @@ jobs:
4252
file: "./Dockerfile"
4353
platforms: "linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6"
4454
push: true
45-
tags: "pr-${{ github.event.number }}"
55+
tags: "${{ env.IMAGE_NAME }}:pr-${{ github.event.number }}"

0 commit comments

Comments
 (0)