Skip to content

Commit 5a04f47

Browse files
committed
Adding new Dockerhub build and push images
1 parent 1a32e44 commit 5a04f47

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: backend-build-push
2+
on:
3+
push:
4+
paths:
5+
- 'backend/**'
6+
7+
branches:
8+
- master
9+
workflow_dispatch:
10+
11+
permissions:
12+
id-token: write
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Login to Dockerhub
21+
id: docker-hub
22+
env:
23+
username: ${{secrets.DOCKERHUB_USERNAME}}
24+
password: ${{secrets.DOCKERHUB_PASSWORD}}
25+
run: |
26+
docker login -u $username -p $password
27+
28+
- name: Docker Build and Publish
29+
uses: docker/build-push-action@v2
30+
with:
31+
context: ./backend
32+
file: ./backend/Dockerfile
33+
push: true
34+
tags: frnn4268/easyparksystem-backend:${{github.run_number}}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: frontend-build-push
2+
on:
3+
push:
4+
paths:
5+
- 'frontend/**'
6+
7+
branches:
8+
- master
9+
workflow_dispatch:
10+
11+
permissions:
12+
id-token: write
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Login to Dockerhub
21+
id: docker-hub
22+
env:
23+
username: ${{secrets.DOCKERHUB_USERNAME}}
24+
password: ${{secrets.DOCKERHUB_PASSWORD}}
25+
run: |
26+
docker login -u $username -p $password
27+
28+
- name: Docker Build and Publish
29+
uses: docker/build-push-action@v2
30+
with:
31+
context: ./frontend
32+
file: ./frontend/Dockerfile
33+
push: true
34+
tags: frnn4268/easyparksystem-frontend:${{github.run_number}}

0 commit comments

Comments
 (0)