Skip to content

Commit d297bcb

Browse files
philippe-cbwfwininger
authored andcommitted
Add a github-action to build and publish on docker hub.
1 parent 2105fb9 commit d297bcb

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
push_to_registries:
10+
name: Push Docker image
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out the repo
14+
uses: actions/checkout@v4
15+
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v3
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
21+
22+
- name: Build and push Docker images
23+
id: push
24+
uses: docker/build-push-action@v6
25+
with:
26+
context: .
27+
push: true
28+
tags: cyberwatch/snmp-emulator:latest

0 commit comments

Comments
 (0)