Skip to content

Commit e71a886

Browse files
committed
ci: workflow for building and publishing docker image
1 parent 058e5cf commit e71a886

File tree

1 file changed

+30
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)