From 1e9981a6b4dd3e2b42cff1467420d5924a191614 Mon Sep 17 00:00:00 2001 From: gokhangunduz Date: Thu, 4 Jan 2024 10:57:00 +0300 Subject: [PATCH] feat(actions): :tada: add github-action integrations --- .github/workflows/onpremise-dds-01.yaml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/onpremise-dds-01.yaml diff --git a/.github/workflows/onpremise-dds-01.yaml b/.github/workflows/onpremise-dds-01.yaml new file mode 100644 index 00000000..fa205f95 --- /dev/null +++ b/.github/workflows/onpremise-dds-01.yaml @@ -0,0 +1,41 @@ +name: Docker Image (onpremise-dds-01) + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: onpremise-dds-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 }}-dds-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 }}-dds-01