Skip to content

Commit 2e63cb8

Browse files
authored
Add CI Workflow to build image (#4)
1 parent 674fdf5 commit 2e63cb8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/image.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Docker image
2+
3+
on: push
4+
5+
jobs:
6+
push_to_registry:
7+
name: Push Docker image to Docker Hub
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out the repo
11+
uses: actions/checkout@v3
12+
13+
- name: Log in to Docker Hub
14+
uses: docker/login-action@v2
15+
with:
16+
username: ${{ secrets.DOCKERHUB_USERNAME }}
17+
password: ${{ secrets.DOCKERHUB_TOKEN }}
18+
19+
- name: Extract metadata (tags, labels) for Docker
20+
id: meta
21+
uses: docker/metadata-action@v2
22+
with:
23+
images: mstiri/kube-cert-acm
24+
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@v4
27+
with:
28+
context: .
29+
push: true
30+
tags: ${{ steps.meta.outputs.tags }}
31+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)