Skip to content

Commit c94145e

Browse files
committed
added workflow to deploy docker image when new release tag is created
1 parent b2b2720 commit c94145e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
# push:
7+
# branches:
8+
# - 'develop'
9+
jobs:
10+
push_to_registry:
11+
name: Push Docker image to Docker Hub
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out the repo
15+
uses: actions/checkout@v4
16+
17+
- name: Log in to Docker Hub
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DOCKER_USERNAME }}
21+
password: ${{ secrets.DOCKER_PASSWORD }}
22+
23+
- name: build the docker image
24+
id: build-docker-image
25+
run: |
26+
ls -la
27+
cd server
28+
docker build . -f docker/release/Dockerfile -t nirlipo/planimation_frontend_js:latest
29+
30+
- name: push the docker image
31+
id: push-docker-image
32+
run: docker push ${{secrets.DOCKERHUB_USERNAME}}/planimation_frontend_js:latest

0 commit comments

Comments
 (0)