From 92de6b3ae402a69fb077dcc82b762f170fd388f7 Mon Sep 17 00:00:00 2001 From: mkcetinkaya Date: Thu, 21 Nov 2024 08:50:10 +0000 Subject: [PATCH] new env added --- .github/workflows/onpremise-agri-01.yaml | 42 ++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/onpremise-agri-01.yaml diff --git a/.github/workflows/onpremise-agri-01.yaml b/.github/workflows/onpremise-agri-01.yaml new file mode 100644 index 00000000..41698da1 --- /dev/null +++ b/.github/workflows/onpremise-agri-01.yaml @@ -0,0 +1,42 @@ +name: Docker Image (onpremise-agri-01) + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: onpremise-agri-01 + + steps: + - name: Checkout Code + uses: actions/checkout@v4.1.1 + + - 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 }}-agri-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_DEFAULT_MODE=${{ secrets.REACT_APP_DEFAULT_MODE }} \ + --build-arg REACT_APP_SWITCHABLE_MODE=${{ secrets.REACT_APP_SWITCHABLE_MODE }} \ + --build-arg REACT_APP_CREATABLE_ORGANIZATION=${{ secrets.REACT_APP_CREATABLE_ORGANIZATION }} \ + --build-arg REACT_APP_CREATABLE_REGION=${{ secrets.REACT_APP_CREATABLE_REGION }} \ + --build-arg REACT_APP_CREATABLE_INSTANCE=${{ secrets.REACT_APP_CREATABLE_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 }}-agri-01 diff --git a/package.json b/package.json index 97ae85ce..31ed4b34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "0.41.9", + "version": "0.42.0", "private": true, "scripts": { "dev": "GENERATE_SOURCEMAP=false react-scripts start",