[DOP-11711] Run tests in github actions #10
Workflow file for this run
This file contains 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: Docker image | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches-ignore: | |
- master | |
workflow_dispatch: | |
jobs: | |
build-backend: | |
name: Build backend image | |
runs-on: ubuntu-latest | |
if: github.repository == 'MobileTeleSystems/syncmaster' # prevent running on forks | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build Backend image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/backend.dockerfile | |
cache-to: type=gha,mode=max | |
cache-from: type=gha | |
provenance: mode=max | |
build-worker: | |
name: Build worker image | |
runs-on: ubuntu-latest | |
if: github.repository == 'MobileTeleSystems/syncmaster' # prevent running on forks | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build Backend image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/worker.dockerfile | |
cache-to: type=gha,mode=max | |
cache-from: type=gha | |
provenance: mode=max |