Skip to content

Commit 48baf6d

Browse files
committedSep 19, 2022
ci: add docker image publishing workflow
1 parent 3846eea commit 48baf6d

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed
 

‎.github/workflows/docker-image.yml renamed to ‎.github/workflows/build-docker-image.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker Image CI
1+
name: Build Docker image
22

33
on:
44
push:
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push_to_registry:
9+
name: Push Docker image to Docker Hub
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out the repo
13+
uses: actions/checkout@v3
14+
15+
- name: Log in to Docker Hub
16+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
17+
with:
18+
username: ${{ secrets.DOCKER_USERNAME }}
19+
password: ${{ secrets.DOCKER_PASSWORD }}
20+
21+
- name: Extract metadata (tags, labels) for Docker
22+
id: meta
23+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
24+
with:
25+
images: engineervix/python-latex
26+
27+
- name: Build and push Docker image
28+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
29+
with:
30+
context: .
31+
push: true
32+
tags: ${{ steps.meta.outputs.tags }}
33+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)
Please sign in to comment.