Skip to content
Merged
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
37 changes: 15 additions & 22 deletions .github/workflows/elasticsearch-docker-8.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
name: Elasticsearch 8.x Docker Image CI

on:
pull_request:
paths:
- "build/docker/elasticsearch/8.x/**"
- ".github/workflows/elasticsearch-docker-8.yml"
push:
branches: [main]
paths:
- "build/docker/elasticsearch/8.x/**"
- ".github/workflows/elasticsearch-docker-8.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true

steps:
- uses: actions/checkout@v7
- name: Setup .NET Core
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.402
- name: Build Reason
env:
GITHUB_EVENT: ${{ toJson(github) }}
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
- name: Build Version
run: |
dotnet tool install --global minver-cli --version 7.0.0
version=$(minver --tag-prefix v)
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
echo "### Version: $version" >> $GITHUB_STEP_SUMMARY
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
platforms: linux/amd64,linux/arm64
- name: Build custom Elasticsearch 8.x docker image
working-directory: build/docker/elasticsearch/8.x
env:
PUBLISH: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
run: |
VERSION=$(sed -n 's/.*elasticsearch:\([^ ]*\).*/\1/p' Dockerfile)
docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --tag exceptionless/elasticsearch:$VERSION --tag exceptionless/elasticsearch:latest
docker buildx build --platform linux/amd64,linux/arm64 --push="$PUBLISH" --file ./Dockerfile . --tag "exceptionless/elasticsearch:$VERSION" --tag exceptionless/elasticsearch:latest
Loading