-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.61 KB
/
public-demo.yaml
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
name: Docker Image (public-demo)
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
environment:
name: public-demo
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Extract Version from package.json
id: project_version
run: echo "::set-output name=version::$(node -e 'console.log(require("./package.json").version)')"
- name: Build the Docker Image
run: |
docker build \
--file Dockerfile \
--tag robolaunchio/frontend-public:${{ steps.project_version.outputs.version }}-demo \
--build-arg REACT_APP_BACKEND_URL=${{ secrets.REACT_APP_BACKEND_URL }} \
--build-arg REACT_APP_KEYCLOAK_URL=${{ secrets.REACT_APP_KEYCLOAK_URL }} \
--build-arg REACT_APP_KEYCLOAK_REALM=${{ secrets.REACT_APP_KEYCLOAK_REALM }} \
--build-arg REACT_APP_KEYCLOAK_CLIENT_ID=${{ secrets.REACT_APP_KEYCLOAK_CLIENT_ID }} \
--build-arg REACT_APP_APPLICATION=${{ secrets.REACT_APP_APPLICATION }} \
--build-arg REACT_APP_CREATE_ORGANIZATION=${{ secrets.REACT_APP_CREATE_ORGANIZATION }} \
--build-arg REACT_APP_CREATE_REGION=${{ secrets.REACT_APP_CREATE_REGION }} \
--build-arg REACT_APP_CREATE_INSTANCE=${{ secrets.REACT_APP_CREATE_INSTANCE }} \
.
- name: Login to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Push the Docker Image to Docker Hub
run: docker push robolaunchio/frontend-public:${{ steps.project_version.outputs.version }}-demo