Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit da02d60

Browse files
committed
Merge branch 'master' into feature_firstApiCall
2 parents c00b1d7 + 6a76730 commit da02d60

File tree

4 files changed

+74
-59
lines changed

4 files changed

+74
-59
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Latest Release
2+
3+
on: push
4+
5+
jobs:
6+
Build_Docker_Image_on_Push:
7+
runs-on: ubuntu-latest
8+
steps:
9+
-
10+
name: Set up Project
11+
uses: actions/checkout@v2
12+
-
13+
name: Set up Node.js environment
14+
uses: actions/[email protected]
15+
with:
16+
node-version: 12
17+
-
18+
name: Build frontend
19+
run: |
20+
cd webapp_frontend
21+
npm i
22+
npm run-script build
23+
cp -r build ../webapp_provider/public
24+
-
25+
name: Login to DockerHub
26+
uses: docker/login-action@v1
27+
with:
28+
username: ${{ secrets.DOCKER_USER }}
29+
password: ${{ secrets.DOCKER_PW }}
30+
-
31+
name: Build and push
32+
run: |
33+
docker build -t filefighter/frontend:latest webapp_provider/
34+
docker push filefighter/frontend:latest
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Stable Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
jobs:
8+
Build_Docker_Image_on_new_Tag:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Set up Project
12+
uses: actions/checkout@v2
13+
- name: Set up Node.js environment
14+
uses: actions/[email protected]
15+
with:
16+
node-version: 12
17+
- name: Build frontend
18+
run: |
19+
cd webapp_frontend
20+
npm i
21+
npm run-script build
22+
cp -r build ../webapp_provider/public
23+
- name: Login to DockerHub
24+
uses: docker/login-action@v1
25+
with:
26+
username: ${{ secrets.DOCKER_USER }}
27+
password: ${{ secrets.DOCKER_PW }}
28+
-
29+
name: Generate Image Tag from Git Tag
30+
id: vars
31+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
32+
-
33+
name: Push Image to DockerHub Registry
34+
run: |
35+
VERSION=${{ steps.vars.outputs.tag }}
36+
docker build -t filefighter/frontend:$VERSION webapp_provider/
37+
docker push filefighter/frontend:$VERSION

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# WebApp
22
Frontend Web Application for FileFighter.
3-
![Create New Release](https://github.com/FileFighter/WebApp/workflows/Create%20New%20Release/badge.svg)
3+
![Latest Release](https://github.com/FileFighter/WebApp/workflows/Latest%20Release/badge.svg)
4+
![Stable Release](https://github.com/FileFighter/WebApp/workflows/Stable%20Release/badge.svg)
45

56
## Deployment
6-
The code is deployed with docker as an image. [Docker](https://hub.docker.com/repository/docker/filefighter/frontend)
7+
The code is deployed with docker as an image. [Docker](https://hub.docker.com/r/filefighter/frontend)

0 commit comments

Comments
 (0)