Updates in response to changes requested #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |