-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (33 loc) · 1.05 KB
/
elasticsearch.yaml
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
name: Elasticsearch
on:
push:
branches: [ master ]
paths:
- 'elasticsearch/**'
- '.github/workflows/elasticsearch.yaml'
pull_request:
paths:
- 'elasticsearch/**'
- '.github/workflows/elasticsearch.yaml'
schedule:
- cron: '0 0 1,15 * *'
workflow_dispatch:
jobs:
build:
name: ${{ matrix.elasticsearch }}
runs-on: ubuntu-latest
strategy:
matrix:
elasticsearch: [7.12.1]
steps:
- uses: actions/checkout@v2
- name: Build the image
run: |
cd elasticsearch/${{ matrix.elasticsearch }}
docker build . --tag monsieurbiz/elasticsearch:${{ matrix.elasticsearch }}
docker images
- name: Push the image
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
run: |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
docker push monsieurbiz/elasticsearch:${{ matrix.elasticsearch }}