Files
keenetic-grafana-monitoring/.github/workflows/docker-publish.yml
Vitaliy Skrypnyk a2762faad2 Add github CI
2021-09-01 16:15:43 +03:00

41 lines
1006 B
YAML

name: Publish docker images
on:
push:
branches:
- 'master'
release:
types: [ published ]
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: techh/keenetic-grafana-monitoring
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}