Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 0184242

Browse files
spateconIlya Pavlyukov
authored andcommitted
DockerHub
1 parent bf56740 commit 0184242

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/dockerhub.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,25 @@ on:
66
- '*' # Push events to every tag not containing /
77

88
jobs:
9-
build:
9+
push_to_registry:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Check out the repo
13+
uses: actions/checkout@v3
1214
- name: Login to Docker Hub
1315
uses: docker/login-action@v2
1416
with:
1517
username: ${{ secrets.DOCKER_HUB_USERNAME }}
16-
password: ${{ secrets.DOCKER_HUB_TOKEN }}
18+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
19+
- name: Extract metadata (tags, labels) for Docker
20+
id: meta
21+
uses: docker/metadata-action@v4
22+
with:
23+
images: ${{ secrets.DOCKER_HUB_USERNAME }}/gitlab-review-bot
1724
- name: Build and push to Docker Hub
1825
uses: docker/build-push-action@v3
1926
with:
2027
context: .
21-
file: deploy/Dockerfile
2228
push: true
23-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/gitlab-review-bot:latest
29+
tags: ${{ steps.meta.outputs.tags }}
30+
labels: ${{ steps.meta.outputs.labels }}

deploy/Dockerfile renamed to Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY go.sum ./
77

88
RUN go mod download
99

10-
COPY ./ ./
10+
COPY . .
1111
RUN go build -o /gitlab-review-bot github.com/spatecon/gitlab-review-bot/cmd/gitlab-review-bot
1212

1313
CMD ["/gitlab-review-bot"]

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ services:
2727
ports:
2828
- "8081:8081"
2929
gitlab-review-bot:
30+
image: spatecon/gitlab-review-bot:latest
3031
depends_on:
3132
- mongo
32-
build:
33-
context: .
34-
dockerfile: deploy/Dockerfile
3533
restart: "no"
3634
environment:
3735
- MONGO_HOST=mongo

0 commit comments

Comments
 (0)