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: Bump docker gh actions, use Compose v2 #967

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
80 changes: 32 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- 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 @@ -60,17 +60,15 @@ jobs:
needs: [lint_web]
name: Build mwdb-core web image
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- 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 @@ -87,17 +85,15 @@ jobs:
build_backend_e2e:
name: Build backend e2e test image
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- 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 @@ -114,17 +110,15 @@ jobs:
build_frontend_e2e:
name: Build frontend e2e test image
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- 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 All @@ -141,17 +135,15 @@ jobs:
build_frontend_unit_test:
name: Build frontend unit test image
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- name: Build and push mwdb-web-unit-tests image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
file: ./deploy/docker/Dockerfile-web-unit-test
tags: |
Expand All @@ -168,8 +160,6 @@ jobs:
needs: [build_core, build_frontend, build_backend_e2e]
name: Perform backend e2e tests
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand All @@ -189,13 +179,13 @@ jobs:
./gen_vars.sh test
- name: Perform tests
run: |
docker-compose -f docker-compose-e2e.yml up -d mwdb-tests
docker-compose -f docker-compose-e2e.yml logs -f -t mwdb-tests
docker compose -f docker-compose-e2e.yml up -d mwdb-tests
docker compose -f docker-compose-e2e.yml logs -f -t mwdb-tests
([ $(docker wait mwdb_core_e2e_tests) == 0 ])
- name: Job failed - storing application logs
if: ${{ failure() }}
run: |
docker-compose -f docker-compose-e2e.yml logs --no-color -t mwdb > ./mwdb-e2e-logs
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
Expand All @@ -206,8 +196,6 @@ jobs:
needs: [build_core, build_frontend, build_frontend_e2e]
name: Perform frontend e2e tests
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand All @@ -227,8 +215,8 @@ jobs:
./gen_vars.sh test
- name: Perform tests
run: |
docker-compose -f docker-compose-e2e.yml up -d web-tests
docker-compose -f docker-compose-e2e.yml logs -f -t web-tests
docker compose -f docker-compose-e2e.yml up -d web-tests
docker compose -f docker-compose-e2e.yml logs -f -t web-tests
([ $(docker wait mwdb_core_e2e_web_tests) == 0 ])
- name: Job failed - storing videos from e2e tests
if: ${{ failure() }}
Expand All @@ -244,8 +232,6 @@ jobs:
needs: [ build_frontend_unit_test ]
name: Perform frontend unit tests
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand All @@ -261,8 +247,8 @@ jobs:
./gen_vars.sh test
- name: Perform tests
run: |
docker-compose -f docker-compose-unit-test.yml up -d
docker-compose -f docker-compose-unit-test.yml logs -f -t
docker compose -f docker-compose-unit-test.yml up -d
docker compose -f docker-compose-unit-test.yml logs -f -t
push_images:
needs: [test_backend_e2e, test_frontend_e2e, test_frontend_unit]
name: Push images on Docker Hub
Expand All @@ -272,16 +258,16 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
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 @@ -293,7 +279,7 @@ jobs:
type=registry,ref=certpl/mwdb:buildcache,mode=max
push: true
- 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 @@ -306,7 +292,7 @@ jobs:
type=registry,ref=certpl/mwdb-web-source:buildcache,mode=max
push: true
- 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 @@ -322,22 +308,20 @@ jobs:
name: Push test images on Docker Hub
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
env:
DOCKER_BUILDKIT: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
- 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-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 @@ -350,7 +334,7 @@ jobs:
type=registry,ref=certpl/mwdb-tests:buildcache,mode=max
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 All @@ -363,7 +347,7 @@ jobs:
type=registry,ref=certpl/mwdb-web-tests:buildcache,mode=max
push: true
- name: Build and push mwdb-web-unit-tests image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
file: ./deploy/docker/Dockerfile-web-unit-test
tags: |
Expand Down
Loading