Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: package
name: Build ingest-file

on:
push:
merge_group:
workflow_dispatch:
workflow_dispatch:

permissions:
packages: write
Expand All @@ -13,51 +13,63 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/investigativedata/ingest-file
images: ghcr.io/dataresearchcenter/ingest-file
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up
run: |
docker --version
docker compose --version
echo "${GITHUB_REF}"

- name: Build container
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
load: true
cache-from: type=registry,ref=ghcr.io/investigativedata/ingest-file:cache
cache-to: type=registry,ref=ghcr.io/investigativedata/ingest-file:cache,mode=max
cache-from: type=registry,ref=ghcr.io/dataresearchcenter/ingest-file:cache
cache-to: type=registry,ref=ghcr.io/dataresearchcenter/ingest-file:cache,mode=max

- name: Start services
run: |
make services

- name: Install development dependencies
run: make dev

- name: Check formatting
run: make format-check

- name: Run linter (ruff)
run: make lint

- name: Run tests
run: make test

- name: Push docker images
uses: docker/build-push-action@v6
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')) && github.actor != 'dependabot[bot]'
Expand All @@ -67,17 +79,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/investigativedata/ingest-file:cache
cache-to: type=registry,ref=ghcr.io/investigativedata/ingest-file:cache,mode=max
# - name: Push docker images for tags
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# run: |
# export TAG=${GITHUB_REF/refs\/tags\//}

# docker tag ghcr.io/investigativedata/ingest-file ghcr.io/investigativedata/ingest-file:${TAG};
# docker push ghcr.io/investigativedata/ingest-file:${TAG};

# - name: Tag latest image
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/test-')
# run: |
# docker push ghcr.io/investigativedata/ingest-file;
cache-from: type=registry,ref=ghcr.io/dataresearchcenter/ingest-file:cache
cache-to: type=registry,ref=ghcr.io/dataresearchcenter/ingest-file:cache,mode=max
6 changes: 1 addition & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ services:
image: redis:alpine
command: ["redis-server", "--save", "3600", "10"]

rabbitmq:
image: rabbitmq:3.9-management-alpine

ingest-file:
build:
context: .
# image: ghcr.io/alephdata/ingest-file
# image: ghcr.io/dataresearchcenter/ingest-file
hostname: ingest
tmpfs:
- /tmp:mode=777
Expand All @@ -34,4 +31,3 @@ services:
depends_on:
- postgres
- redis
- rabbitmq