setup action to build/publish on docker hub

This commit is contained in:
Guilhem Saurel 2021-07-18 19:55:15 +02:00
parent fbcae98390
commit dcc73dfc81
2 changed files with 30 additions and 0 deletions

29
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Publish Docker image
on:
push:
branches:
- 'master'
- 'devel'
tags:
- 'v*'
jobs:
docker-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/metadata-action@v3
id: meta
with:
images: nim65s/matrix-webhook
- uses: docker/login-action@v1
with:
username: nim65s
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}