Skip to content

Commit

Permalink
feat: elasticsearch-a0
Browse files Browse the repository at this point in the history
  • Loading branch information
rophy committed Mar 14, 2024
1 parent 419edbf commit 0276b2c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/elasticsearch-a0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: rophy/elasticsearch-a0
on:
push:
paths:
- elasticsearch-a0/**
jobs:
test:
if: github.ref != 'refs/heads/main' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./elasticsearch-a0
dockerfile: ./elasticsearch-a0/Dockerfile
push: false
build-and-push:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set variables
run: |
VER=$(cat elasticsearch-a0/version.txt)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./elasticsearch-a0
dockerfile: ./elasticsearch-a0/Dockerfile
push: true
tags: rophy/elasticsearch-a0:${{ env.VERSION }}
8 changes: 8 additions & 0 deletions elasticsearch-a0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM elasticsearch:7.16.1

RUN bin/elasticsearch-plugin install --batch \
analysis-icu \
analysis-kuromoji \
ingest-attachment \
repository-s3 \
https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.16.1/elasticsearch-analysis-ik-7.16.1.zip
2 changes: 2 additions & 0 deletions elasticsearch-a0/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build:
docker build -t rophy/elasticsearch-a0 .
1 change: 1 addition & 0 deletions elasticsearch-a0/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.16.1-20240314-r1

0 comments on commit 0276b2c

Please sign in to comment.