Skip to content

Commit 0bef920

Browse files
authored
ci: workflow for building and publishing docker image
1 parent 058e5cf commit 0bef920

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and push Docker image to DockerHub
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
workflow_dispatch: # allows manual trigger
7+
8+
jobs:
9+
push_to_registry:
10+
name: Push Docker image to Docker Hub
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out the repo
15+
uses: actions/checkout@v3
16+
17+
- name: Log in to Docker Hub
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DBP_DOCKERHUB_CREDENTIAL_USERNAME }}
21+
password: ${{ secrets.DBP_DOCKERHUB_CREDENTIAL_TOKEN_PUSHIMAGES }}
22+
23+
- name: Build and push Docker image
24+
uses: docker/build-push-action@v6
25+
with:
26+
context: .
27+
push: true
28+
tags: dbpedia/python-databus-client:latest

0 commit comments

Comments
 (0)