From e3ef5aa6276055848c75f6245efe4d13159db8d4 Mon Sep 17 00:00:00 2001 From: gokhangunduz Date: Mon, 11 Dec 2023 16:10:08 +0300 Subject: [PATCH] refactor(workflows): :tada: update action workflows --- .github/workflows/dev.yaml | 52 ++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index c330b610..1d37f28b 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -12,28 +12,30 @@ jobs: name: development steps: - - name: Display environment secret variable - run: echo ${{ secrets.DOCKER_USERNAME }} - - - name: Display environment secret variable - run: echo ${{ secrets.TEST2 }} - - # - 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-dev \ - # --tag robolaunchio/frontend-public:${{ steps.project_version.outputs.version }}-dev \ - # . - - # - 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 }}-dev + - 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-dev \ + --tag robolaunchio/frontend-public:${{ steps.project_version.outputs.version }}-dev \ + --build-arg REACT_APP_BACKEND_URL=${{ secrets.DEV_REACT_APP_BACKEND_URL }} \ + --build-arg REACT_APP_KEYCLOAK_URL=${{ secrets.DEV_REACT_APP_KEYCLOAK_URL }} \ + --build-arg REACT_APP_KEYCLOAK_REALM=${{ secrets.DEV_REACT_APP_KEYCLOAK_REALM }} \ + --build-arg REACT_APP_KEYCLOAK_CLIENT_ID=${{ secrets.DEV_REACT_APP_KEYCLOAK_CLIENT_ID }} \ + --build-arg REACT_APP_APPLICATION=${{ secrets.DEV_REACT_APP_APPLICATION }} \ + --build-arg REACT_APP_CREATE_ORGANIZATION=${{ secrets.DEV_REACT_APP_CREATE_ORGANIZATION }} \ + --build-arg REACT_APP_CREATE_REGION=${{ secrets.DEV_REACT_APP_CREATE_REGION }} \ + --build-arg REACT_APP_CREATE_INSTANCE=${{ secrets.DEV_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 }}-dev diff --git a/package.json b/package.json index 168ddd2b..e4b34397 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "0.21.5", + "version": "0.21.6", "private": true, "scripts": { "dev": "react-scripts start",