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

Commit 0a3a284

Browse files
committed
FF-52 reworked pipelines, added stable and latest release
1 parent cb51808 commit 0a3a284

File tree

3 files changed

+71
-57
lines changed

3 files changed

+71
-57
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

0 commit comments

Comments
 (0)