diff --git a/.github/workflows/build-ui-image.yaml b/.github/workflows/build-ui-image.yaml new file mode 100644 index 00000000..bc63446b --- /dev/null +++ b/.github/workflows/build-ui-image.yaml @@ -0,0 +1,38 @@ +name: Build UI and Test + +# This workflow will run on master branch and on any pull requests targeting master +on: + push: + tags: + - 'v*' +jobs: + build-and-push-docker-ui-image: + name: Build and push UI Docker image + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get tag + id: tag + run: echo "TAG=$(git describe --tags HEAD)" >> $GITHUB_OUTPUT + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build image and push to Docker Hub + uses: docker/build-push-action@v2 + with: + context: ./ui/ + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ github.repository }}-ui:${{ steps.tag.outputs.TAG }},${{ github.repository }}-ui:latest \ No newline at end of file diff --git a/ui/nginx.cfg/nginx.conf b/ui/nginx.cfg/nginx.conf index cc739e66..a8e14589 100644 --- a/ui/nginx.cfg/nginx.conf +++ b/ui/nginx.cfg/nginx.conf @@ -4,6 +4,7 @@ server { root /usr/share/nginx/html; location = / { + absolute_redirect off; return 301 /nodeIDs; } location /nodeIDs {