Skip to content

Commit

Permalink
use matrix to define build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Mar 21, 2024
1 parent 1840137 commit 73e7e8a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 146 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/image-refsearch.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/image-tools.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Publish Images

on:
push:
branches:
- master

jobs:
build-and-publish:
name: Build and publish
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: refsearch-backend
context: .
file: ./backend.Dockerfile
target: api-runner
- name: refsearch-runner
context: .
file: ./backend.Dockerfile
target: job-runner
- name: refsearch-frontend
context: .
file: ./frontend.Dockerfile
target: runner
- name: refsearch-rminer
context: ./tools/refactoringminer
file: ./Dockerfile
target: runner
- name: refsearch-refdiff
context: ./tools/refdiff
file: ./Dockerfile
target: runner
steps:
- 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: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: salab
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: ${{ matrix.context }}
file: ${{ matrix.file }}
target: ${{ matrix.target }}
platforms: linux/amd64,linux/arm64
tags: ghcr.io/salab/${{ matrix.name }}:master
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 73e7e8a

Please sign in to comment.