Add the fastcat tool #31
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: build docker images | |
on: | |
push: | |
paths: | |
- 'deepmod2/**' | |
- 'deepmod2-gpu/**' | |
- 'annovar/**' | |
- 'fastcat/**' | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- app: deepmod2 | |
platforms: linux/amd64 | |
- app: deepmod2-gpu | |
platforms: linux/amd64 | |
- app: annovar | |
platforms: linux/amd64,linux/arm64 | |
- app: fastcat | |
platforms: linux/amd64,linux/arm64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- 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 Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Read version file | |
id: get_version | |
run: echo "version=$(cat ${{ matrix.app }}/version)" >> $GITHUB_OUTPUT | |
- name: Check if files changed | |
id: files_changed | |
run: | | |
if git diff-tree --no-commit-id --name-only -r HEAD | grep -q "^${{ matrix.app }}/"; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Build and push Docker image | |
if: ${{ steps.files_changed.outputs.changed == 'true' }} | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{ matrix.app }} | |
platforms: ${{ matrix.platforms }} | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.app }}:${{ steps.get_version.outputs.version }} | |
build-args: | | |
BUILD_VERSION=${{ steps.get_version.outputs.version }} | |
- name: Debug Output | |
run: | | |
echo "Event name: ${{ github.event_name }}" | |
echo "App: ${{ matrix.app }}" | |
echo "Files changed: ${{ steps.files_changed.outputs.changed }}" | |
echo "Version: ${{ steps.get_version.outputs.version }}" |