Skip to content

Update docker-image.yml #12

Update docker-image.yml

Update docker-image.yml #12

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish Docker Image
on:
push:
branches:
- '**'
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
-
name: Check out the repo
uses: actions/checkout@v3
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
stevensrtw/elasticsearch
ghcr.io/${{ github.repository }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: stevensrtw
password: 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
- name: Build and push Docker image (v1)
id: docker_build_1
uses: docker/build-push-action@v3
timeout-minutes: 20
with:
context: ./1.7
push: ${{ github.event_name != 'pull_request' }}
tags: |
stevensrtw/elasticsearch:1
stevensrtw/elasticsearch:1.7
stevensrtw/elasticsearch:1.7.6
ghcr.io/stevensrtw/elasticsearch:1
ghcr.io/stevensrtw/elasticsearch:1.7
ghcr.io/stevensrtw/elasticsearch:1.7.6
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (v6)
id: docker_build_6
uses: docker/build-push-action@v3
timeout-minutes: 20
with:
context: ./6.8
push: ${{ github.event_name != 'pull_request' }}
tags: |
stevensrtw/elasticsearch:6
stevensrtw/elasticsearch:6.8
stevensrtw/elasticsearch:6.8.23
ghcr.io/stevensrtw/elasticsearch:6
ghcr.io/stevensrtw/elasticsearch:6.8
ghcr.io/stevensrtw/elasticsearch:6.8.23
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (v7)
id: docker_build_7
uses: docker/build-push-action@v3
timeout-minutes: 20
with:
context: ./7.17
push: ${{ github.event_name != 'pull_request' }}
tags: |
stevensrtw/elasticsearch:7
stevensrtw/elasticsearch:7.17
stevensrtw/elasticsearch:7.17.2
ghcr.io/stevensrtw/elasticsearch:7
ghcr.io/stevensrtw/elasticsearch:7.17
ghcr.io/stevensrtw/elasticsearch:7.17.2
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (v8)
id: docker_build_8
uses: docker/build-push-action@v3
timeout-minutes: 20
with:
context: ./8.1
push: ${{ github.event_name != 'pull_request' }}
tags: |
stevensrtw/elasticsearch:latest
stevensrtw/elasticsearch:8
stevensrtw/elasticsearch:8.1
stevensrtw/elasticsearch:8.1.2
ghcr.io/stevensrtw/elasticsearch:latest
ghcr.io/stevensrtw/elasticsearch:8
ghcr.io/stevensrtw/elasticsearch:8.1
ghcr.io/stevensrtw/elasticsearch:8.1.2
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
# - name: Build and push Docker image (X-Pack)
# id: docker_build_x_pack
# uses: docker/build-push-action@v3
# with:
# context: ./x-pack
# push: ${{ github.event_name != 'pull_request' }}
# tags: |
# stevensrtw/elasticsearch:x-pack
# stevensrtw/elasticsearch:x-pack-7
# stevensrtw/elasticsearch:x-pack-7.15
# stevensrtw/elasticsearch:x-pack-7.15.1
# labels: ${{ steps.meta.outputs.labels }}