-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.13 KB
/
ci-main.yml
File metadata and controls
49 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
dotnet-version: 8.0.x
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_REACT_APP_SERVER: ${{ vars.SERVER_URL }}
directory: .
file_name: .env
- name: Restore dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Write release version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build docker image
run: docker build -t scalefocusad/photopixels-web:${VERSION} -f ./Dockerfile .
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASS }}
- name: "Push Docker image"
run: docker push scalefocusad/photopixels-web:${VERSION}