Skip to content

Build Latest

Build Latest #27

Workflow file for this run

---
name: Build Latest
# Actions that take place after every commit the master/main branch.
# Here every commit is built, tagged as 'latest' and tested.
# If a DOCKERHUB_USERNAME secret is defined the image is pushed.
#
# Actions also run if the repository is tagged.
# Every tag is pushed, along with latest.
#
# Actions also run on a schedule - the the container is built, tested
# and pushed (if the relevant secrets are set) based on
# a defined schedule.
# ---------------
# Control secrets
# ---------------
#
# At the GitHub 'organisation' or 'project' level you are expected to
# have the following GitHub 'Repository Secrets' defined
# (i.e. via 'Settings -> Secrets'): -
#
# DOCKERHUB_USERNAME optional
# DOCKERHUB_TOKEN optional - required if DOCKERHUB_USERNAME
#
# -----------
# Environment (GitHub Environments)
# -----------
#
# Environment (none)
on:
push:
branches:
- 'master'
- 'main'
tags:
- '**'
schedule:
# Build every Sunday (0) at 4:45pm
- cron: '45 16 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint
run: |
pip install -r build-requirements.txt
pre-commit run --all-files
- name: Build
uses: docker/build-push-action@v5
with:
context: .
tags: xchem/fragalysis:latest
- name: Test
run: >
docker run xchem/fragalysis:latest /bin/sh -c "cd /usr/local/fragalysis && python -m unittest"