diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6ab5a845..737d36d40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies working-directory: mwdb/web run: npm install @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -52,7 +52,7 @@ jobs: type=registry,ref=certpl/mwdb:buildcache outputs: type=docker,dest=./mwdb-image - name: Upload mwdb-core image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-image path: mwdb-image @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -78,7 +78,7 @@ jobs: type=registry,ref=certpl/mwdb-web:buildcache outputs: type=docker,dest=./mwdb-web-image - name: Upload mwdb-core web image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-web-image path: mwdb-web-image @@ -87,7 +87,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -103,7 +103,7 @@ jobs: type=registry,ref=certpl/mwdb-tests:buildcache outputs: type=docker,dest=./mwdb-tests-image - name: Upload test image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-tests-image path: mwdb-tests-image @@ -112,7 +112,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -128,7 +128,7 @@ jobs: type=registry,ref=certpl/mwdb-web-tests:buildcache outputs: type=docker,dest=./mwdb-web-tests-image - name: Upload test image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-web-tests-image path: mwdb-web-tests-image @@ -137,7 +137,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -152,7 +152,7 @@ jobs: type=registry,ref=certpl/mwdb-web-unit-tests:buildcache outputs: type=docker,dest=./mwdb-web-unit-tests-image - name: Upload unit test image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-web-unit-tests-image path: mwdb-web-unit-tests-image @@ -162,9 +162,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: mwdb-* - name: Import images run: | docker load --input ./mwdb-image/mwdb-image @@ -188,7 +190,7 @@ jobs: docker compose -f docker-compose-e2e.yml logs --no-color -t mwdb > ./mwdb-e2e-logs - name: Job failed - upload application logs if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-e2e-logs path: mwdb-e2e-logs @@ -198,9 +200,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: mwdb-* - name: Import images run: | docker load --input ./mwdb-image/mwdb-image @@ -224,7 +228,7 @@ jobs: docker cp mwdb_core_e2e_web_tests:/app/cypress/videos ./artifacts - name: Job failed - upload application logs if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mwdb-e2e-web-videos path: artifacts @@ -234,9 +238,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: mwdb-* - name: Import images run: | docker load --input ./mwdb-web-unit-tests-image/mwdb-web-unit-tests-image @@ -256,13 +262,13 @@ jobs: if: ${{ github.event_name == 'push' }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - 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@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -310,13 +316,13 @@ jobs: if: ${{ github.event_name == 'push' }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - 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@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba77566d9..fb7f19d8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,11 +8,11 @@ jobs: release_pypi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 16.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' - name: Build web bundle working-directory: mwdb/web run: | @@ -23,25 +23,25 @@ jobs: pip3 install setuptools wheel python3 setup.py bdist_wheel - name: Publish to PyPi - uses: pypa/gh-action-pypi-publish@v1.3.0 + uses: pypa/gh-action-pypi-publish@v1.9.0 with: user: __token__ password: ${{ secrets.pypi_password }} release_docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-qemu-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push mwdb-core image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: file: ./deploy/docker/Dockerfile tags: | @@ -52,7 +52,7 @@ jobs: push: true context: . - name: Build and push mwdb-core web image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: file: ./deploy/docker/Dockerfile-web tags: | @@ -63,7 +63,7 @@ jobs: push: true context: . - name: Build and push mwdb-core web-source image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: file: ./deploy/docker/Dockerfile-web target: build @@ -75,7 +75,7 @@ jobs: push: true context: . - name: Build and push mwdb-tests image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: file: ./tests/backend/Dockerfile context: tests/backend @@ -86,7 +86,7 @@ jobs: type=registry,ref=certpl/mwdb-tests:buildcache push: true - name: Build and push mwdb-web-tests image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: file: ./tests/frontend/Dockerfile context: tests/frontend diff --git a/deploy/docker/Dockerfile-web b/deploy/docker/Dockerfile-web index 534b01836..2e5f102ed 100644 --- a/deploy/docker/Dockerfile-web +++ b/deploy/docker/Dockerfile-web @@ -15,8 +15,8 @@ FROM nginx:stable LABEL maintainer="info@cert.pl" -ENV PROXY_BACKEND_URL http://mwdb.:8080 -ENV NGINX_MAX_UPLOAD_SIZE 50M +ENV PROXY_BACKEND_URL=http://mwdb.:8080 +ENV NGINX_MAX_UPLOAD_SIZE=50M COPY docker/nginx.conf.template /etc/nginx/templates/default.conf.template COPY --from=build /app/dist /usr/share/nginx/html diff --git a/deploy/docker/Dockerfile-web-dev b/deploy/docker/Dockerfile-web-dev index 169fc7204..a862c74ab 100644 --- a/deploy/docker/Dockerfile-web-dev +++ b/deploy/docker/Dockerfile-web-dev @@ -11,7 +11,7 @@ RUN cd /app \ && CI=true npm run build \ && npm cache clean --force -ENV PROXY_BACKEND_URL http://mwdb.:8080 +ENV PROXY_BACKEND_URL=http://mwdb.:8080 WORKDIR /app CMD ["npm", "run", "dev"]