-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(workflows): 🎉 update action workflows
- Loading branch information
1 parent
e3ef5aa
commit 4e0d0c0
Showing
11 changed files
with
314 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (onpremise-amz-01) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: onpremise-amz-01 | ||
|
||
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-onpremise:${{ steps.project_version.outputs.version }}-amz-01 \ | ||
--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-onpremise:${{ steps.project_version.outputs.version }}-amz-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (onpremise-auto-01) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: onpremise-auto-01 | ||
|
||
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-onpremise:${{ steps.project_version.outputs.version }}-auto-01 \ | ||
--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-onpremise:${{ steps.project_version.outputs.version }}-auto-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (onpremise-auto-02) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: onpremise-auto-02 | ||
|
||
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-onpremise:${{ steps.project_version.outputs.version }}-auto-02 \ | ||
--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-onpremise:${{ steps.project_version.outputs.version }}-auto-02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (onpremise-def-01) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: onpremise-def-01 | ||
|
||
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-onpremise:${{ steps.project_version.outputs.version }}-def-01 \ | ||
--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-onpremise:${{ steps.project_version.outputs.version }}-def-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (onpremise-hha-01) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: onpremise-hha-01 | ||
|
||
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-onpremise:${{ steps.project_version.outputs.version }}-hha-01 \ | ||
--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-onpremise:${{ steps.project_version.outputs.version }}-hha-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (onpremise-rl-01) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: onpremise-rl-01 | ||
|
||
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-onpremise:${{ steps.project_version.outputs.version }}-rl-01 \ | ||
--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-onpremise:${{ steps.project_version.outputs.version }}-rl-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image (public-demo) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
FROM ubuntu:20.04 | ||
RUN apt-get update | ||
RUN ln -fs /usr/share/zoneinfo/Europe/Istanbul /etc/localtime | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata | ||
RUN apt-get update && apt-get install -y wget curl vim mlocate apache2 | ||
RUN a2enmod rewrite | ||
ADD build /var/www/html/ | ||
COPY .htaccess /var/www/html/.htaccess | ||
COPY 000-default.conf /etc/apache2/sites-enabled/ | ||
RUN echo ServerName 127.0.0.1 >> /etc/apache2/apache2.conf | ||
ENTRYPOINT ["apachectl", "-D", "FOREGROUND"] | ||
FROM node:latest as build-stage | ||
ARG REACT_APP_BACKEND_URL | ||
ARG REACT_APP_KEYCLOAK_URL | ||
ARG REACT_APP_KEYCLOAK_REALM | ||
ARG REACT_APP_KEYCLOAK_CLIENT_ID | ||
ARG REACT_APP_APPLICATION | ||
ARG REACT_APP_CREATE_ORGANIZATION | ||
ARG REACT_APP_CREATE_REGION | ||
ARG REACT_APP_CREATE_INSTANCE | ||
COPY . /app | ||
WORKDIR /app | ||
RUN npm install | ||
RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build | ||
FROM nginx:alpine as production-stage | ||
COPY --from=build-stage /app/build /usr/share/nginx/html | ||
EXPOSE 80 |
Oops, something went wrong.