Skip to content

add readme

add readme #22

Workflow file for this run

name: build docker images
on:
push:
paths:
- 'deepmod2/**'
- 'deepmod2-gpu/**'
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
app:
- deepmod2
- deepmod2-gpu
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- 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 }}
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 }}"