Skip to content

Opensearch Dashboards • Docker Build #36

Opensearch Dashboards • Docker Build

Opensearch Dashboards • Docker Build #36

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
---
name: Docker Image Opensearch Dashboards
on:
schedule:
- cron: "0 6 1 * *"
workflow_dispatch:
push:
paths:
- images/.trigger
- images/opensearch-dashboards/**
branches:
- main
jobs:
opensearch-dashboards:
name: opensearch-dashboards
runs-on: ubuntu-latest
strategy:
matrix:
include:
- BUILD_TAG: "latest"
IMAGE_TAG: "2.12.0"
- BUILD_TAG: "2.12"
IMAGE_TAG: "2.12.0"
- BUILD_TAG: "2.11"
IMAGE_TAG: "2.11.1"
- BUILD_TAG: "2.10"
IMAGE_TAG: "2.10.0"
- BUILD_TAG: "2.9"
IMAGE_TAG: "2.9.0"
- BUILD_TAG: "2.8"
IMAGE_TAG: "2.8.0"
- BUILD_TAG: "2.7"
IMAGE_TAG: "2.7.0"
- BUILD_TAG: "2.6"
IMAGE_TAG: "2.6.0"
- BUILD_TAG: "2.5"
IMAGE_TAG: "2.5.0"
- BUILD_TAG: "2.4"
IMAGE_TAG: "2.4.1"
- BUILD_TAG: "2.3"
IMAGE_TAG: "2.3.0"
- BUILD_TAG: "2.2"
IMAGE_TAG: "2.2.1"
- BUILD_TAG: "2.1"
IMAGE_TAG: "2.1.0"
- BUILD_TAG: "2.0"
IMAGE_TAG: "2.0.1"
- BUILD_TAG: "1.3"
IMAGE_TAG: "1.3.15"
- BUILD_TAG: "1.2"
IMAGE_TAG: "1.2.4"
- BUILD_TAG: "1.1"
IMAGE_TAG: "1.1.0"
steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
- uses: supplypike/setup-bin@v3
with:
uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64
name: gomplate
version: latest
- name: Generate Dockerfile
run: gomplate -f images/opensearch-dashboards/tpl.Dockerfile -o images/opensearch-dashboards/Dockerfile
env:
IMAGE_TAG: ${{ matrix.IMAGE_TAG }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: images/opensearch-dashboards/context
file: images/opensearch-dashboards/Dockerfile
push: true
platforms: "linux/amd64,linux/arm64"
tags: ${{ vars.DOCKER_REPO }}/opensearch-dashboards:${{ matrix.BUILD_TAG }}
cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/opensearch-dashboards:${{ matrix.BUILD_TAG }}
cache-to: type=inline