From 46b4b454df3772acc3e81f626c2e572d2ce51f89 Mon Sep 17 00:00:00 2001 From: Pujan Shah Date: Wed, 4 Sep 2024 08:41:25 +0200 Subject: [PATCH 1/4] Update elasticsearch to 7.16.3 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1b26a84..69ddc2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM elasticsearch:7.16.1 +FROM elasticsearch:7.16.3 LABEL org.opencontainers.image.source = "https://github.com/alephdata/aleph-elasticsearch" RUN bin/elasticsearch-plugin install --batch repository-s3 \ @@ -8,4 +8,4 @@ RUN bin/elasticsearch-plugin install --batch repository-s3 \ COPY k8s-entrypoint.sh /k8s-entrypoint.sh COPY --chown=elasticsearch synonames.txt /usr/share/elasticsearch/config/ -ENTRYPOINT [ "/k8s-entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "/k8s-entrypoint.sh" ] From e1494de237694a45d536a31d4a76e380d6573aa2 Mon Sep 17 00:00:00 2001 From: Christian Stefanescu Date: Wed, 4 Sep 2024 10:26:56 +0200 Subject: [PATCH 2/4] Allow manual workflow dispatch --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 059c314..29a84f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: push: {} schedule: - cron: "0 3 * * *" + workflow_dispatch: permissions: packages: write From 6b8fd565f00e2369817c2fefedce3250ff02d4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20=C8=98tef=C4=83nescu?= Date: Mon, 19 May 2025 16:31:38 +0300 Subject: [PATCH 3/4] Update GHA and ULRs to point to OpenAleph --- .github/workflows/build.yml | 45 ++++++++++++++++++++++++------------- Dockerfile | 2 +- Makefile | 8 +++---- README.md | 7 +++--- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 059c314..0a3d877 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,7 @@ -name: package +name: Build elasticsearch-openaleph -on: +on: push: {} - schedule: - - cron: "0 3 * * *" permissions: packages: write @@ -12,23 +10,40 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/openaleph/aleph-elasticsearch + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=sha + type=raw,value=latest + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 with: install: true - - name: Login to DockerHub - uses: docker/login-action@v1 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 + + - name: Build and push release + uses: docker/build-push-action@v3 with: context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: ghcr.io/alephdata/aleph-elasticsearch:${{ github.sha }} + push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/test-') }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile index 1b26a84..8b55126 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM elasticsearch:7.16.1 -LABEL org.opencontainers.image.source = "https://github.com/alephdata/aleph-elasticsearch" +LABEL org.opencontainers.image.source = "https://github.com/openaleph/aleph-elasticsearch" RUN bin/elasticsearch-plugin install --batch repository-s3 \ && bin/elasticsearch-plugin install --batch repository-gcs \ diff --git a/Makefile b/Makefile index 2a9ad6c..cfd0f9a 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,13 @@ TAG=latest all: push build: - docker build -t alephdata/aleph-elasticsearch:$(TAG) . + docker build -t openaleph/aleph-elasticsearch:$(TAG) . run: build - docker run -ti alephdata/aleph-elasticsearch:$(TAG) bash + docker run -ti openaleph/aleph-elasticsearch:$(TAG) bash exec: build - docker run -ti -v $(PWD)/secrets:/secrets alephdata/aleph-elasticsearch:$(TAG) + docker run -ti -v $(PWD)/secrets:/secrets openaleph/aleph-elasticsearch:$(TAG) push: build - docker push alephdata/aleph-elasticsearch:$(TAG) + docker push openaleph/aleph-elasticsearch:$(TAG) diff --git a/README.md b/README.md index f63a398..35cb628 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # aleph-elasticsearch -This is a vendored version of ElasticSearch, suitable for use with the main Aleph application. -The principal additions are plugins for ICU, repository support for AWS and GCP, and the +This is a vendored version of ElasticSearch, suitable for use with the main OpenAleph application. +The principal additions are plugins for ICU, repository support for AWS and GCP, and the synonym file used to expand queries for names in Aleph. That file is based on the adjacent `synonames` project: -* https://github.com/alephdata/synonames - +- https://github.com/alephdata/synonames From a80e58646a2dcd0cec28fc10389bc5fae32ad7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20=C8=98tef=C4=83nescu?= Date: Mon, 19 May 2025 16:32:27 +0300 Subject: [PATCH 4/4] Make GHA run on push --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a3d877..fdda95c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: uses: docker/build-push-action@v3 with: context: . - push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/test-') }} + push: ${{ github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha