Files
omnivore/.github/workflows/build-docker-images.yml
2024-02-21 14:30:27 +08:00

37 lines
1.3 KiB
YAML

name: Run tests
on:
push:
branches:
- main
paths-ignore:
- 'apple/**'
- 'android/**'
jobs:
build-docker-images:
name: Build docker images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Login to GitHub container registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the backend docker image
run: |
docker build . --file packages/api/Dockerfile --tag "ghcr.io/omnivore-app/backend:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/backend:latest
docker push ghcr.io/omnivore-app/backend:${GITHUB_SHA}
- name: Build the content-fetch docker image
run: |
docker build --file packages/content-fetch/Dockerfile . --tag "ghcr.io/omnivore-app/content-fetch:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/content-fetch:latest
docker push ghcr.io/omnivore-app/content-fetch:${GITHUB_SHA}
- name: Build the web docker image
run: |
docker build --file packages/web/Dockerfile . --tag "ghcr.io/omnivore-app/web:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/web:latest
docker push ghcr.io/omnivore-app/web:${GITHUB_SHA}