chore(deps): bump axios from 1.15.2 to 1.16.0 in /frontend (#23) #75
This file contains hidden or 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
| name: build and push docker images | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| build_and_push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: generate version tag | |
| id: version | |
| run: echo "TAG=$(date +'%Y%m%d.%H%M')" >> $GITHUB_OUTPUT | |
| - name: read product version | |
| id: prodversion | |
| run: | | |
| VERSION=$(jq -r .version version.json) | |
| if [ -z "$VERSION" ] || [ "$VERSION" = "null" ]; then | |
| echo "Failed to read product version from version.json" >&2 | |
| exit 1 | |
| fi | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| # The backend image is built with `context: ./backend`, so the | |
| # repo-root version.json is OUTSIDE the build context and never | |
| # reaches the container. Backend `main.py` falls back to a | |
| # compile-time constant when /app/version.json is missing, which | |
| # caused a real production drift: a redeploy of the v1.5.2 tree | |
| # silently still reported "v1.5.0" in `/api/version` because the | |
| # constant in main.py had been bumped but the file was not | |
| # available to read. Stage version.json into the backend | |
| # context here so the canonical file IS shipped and the | |
| # constant only serves as a defensive fallback. The staged file | |
| # is gitignored to keep `git status` clean for developers. | |
| - name: stage version.json into backend build context | |
| run: cp version.json backend/version.json | |
| - name: set up qemu | |
| uses: docker/setup-qemu-action@v3 | |
| - name: set up docker buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: login to docker hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: build & push backend | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./backend | |
| file: ./backend/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| taylanbakircioglu/haproxy-openmanager-backend:latest | |
| taylanbakircioglu/haproxy-openmanager-backend:${{ steps.version.outputs.TAG }} | |
| taylanbakircioglu/haproxy-openmanager-backend:${{ steps.prodversion.outputs.VERSION }} | |
| - name: build & push frontend | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./frontend | |
| file: ./frontend/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| taylanbakircioglu/haproxy-openmanager-frontend:latest | |
| taylanbakircioglu/haproxy-openmanager-frontend:${{ steps.version.outputs.TAG }} | |
| taylanbakircioglu/haproxy-openmanager-frontend:${{ steps.prodversion.outputs.VERSION }} | |