-
Notifications
You must be signed in to change notification settings - Fork 23
41 lines (35 loc) · 1.11 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
name: Docker
on:
push:
branches: [ master ]
tags:
- v*
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: solacecommunity/solace-prometheus-exporter
tags: |
type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'master') }}
type=raw,value=testing,enable=${{ contains(GitHub.head_ref, 'feature') }}
type=ref,event=tag
flavor: |
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@1bc1040caef9e604eb543693ba89b5bf4fc80935
uses: docker/[email protected]
with:
push: ${{ GitHub.event_name != 'pull_request' || contains(GitHub.head_ref, 'feature') }}
tags: ${{ steps.meta.outputs.tags }}