Skip to content

test: bump version and enable docker push #9

test: bump version and enable docker push

test: bump version and enable docker push #9

Workflow file for this run

name: rophy/elasticsearch
on:
push:
paths:
- elasticsearch/**
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
dockerfile: ./elasticsearch/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/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
dockerfile: ./elasticsearch/Dockerfile
push: true
tags: rophy/elasticsearch:${{ env.VERSION }}