forked from aparo/opensearch-learning-to-rank
-
Notifications
You must be signed in to change notification settings - Fork 16
43 lines (39 loc) · 1.12 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Publish a Docker Image
on:
release:
types: [published]
workflow_dispatch:
inputs:
opensearch-version:
description: 'OpenSearch Version to use'
required: true
default: 2.5.0
ltrversion:
description: 'LTR Plugin Version'
required: true
default: 2.1.0
jobs:
build_push_image:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Docker Buildx
id: setup-docker-buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
file: docker/Dockerfile
# TODO: fix this so it isn't hardcoded
build-args: |
opensearch_version=${{inputs.opensearch-version}}
ltrversion=${{inputs.ltrversion}}
push: true
tags: gsingers/opensearch-learning-to-rank:${{inputs.ltrversion}}
github-token: ${{ secrets.GITHUB_TOKEN }}