lets see how this goes. #94
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: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' # Every day at midnight | |
jobs: | |
build: | |
permissions: | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: fetch repo | |
uses: actions/checkout@v4 | |
with: | |
repository: 'mcpt/wlmoj' | |
path: '${GITHUB_WORKSPACE}/dmoj/repo/' | |
- name: Build images | |
run: docker compose -f docker-build.yml build | |
working-directory: dmoj | |
- name: Test images | |
run: | | |
./scripts/initialize | |
docker compose -f docker-build.yml up -d | |
docker ps -a | |
sleep 15 | |
export COMPOSE_EXEC_FLAGS="-T" | |
export COMPOSE_FLAGS="-f docker-build.yml" | |
./scripts/copy_static | |
./scripts/migrate | |
./scripts/manage loaddata language_small | |
working-directory: dmoj | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push images to GHCR | |
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master' | |
run: | | |
docker push ghcr.io/mcpt/wlmoj-base:latest | |
docker push ghcr.io/mcpt/wlmoj-texoid:latest | |
docker push ghcr.io/mcpt/wlmoj-pdfoid:latest | |
docker push ghcr.io/mcpt/wlmoj-mathoid:latest | |
docker push ghcr.io/mcpt/wlmoj-site:latest | |
docker push ghcr.io/mcpt/wlmoj-celery:latest | |
docker push ghcr.io/mcpt/wlmoj-bridged:latest | |
docker push ghcr.io/mcpt/wlmoj-wsevent:latest |