Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Upgrade deprecated actions #968

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/Dockerfile-web
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ FROM nginx:stable

LABEL maintainer="[email protected]"

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
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/Dockerfile-web-dev
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading