Files
waha/.github/workflows/build.yaml
T
allburov bf47a08401
Release / deploy-docker (push) Waiting to run
No needs in git push
2022-08-14 09:07:19 +03:00

40 lines
948 B
YAML

name: Release
on:
push:
tags:
- "*"
jobs:
deploy-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: allburov/whatsapp-http-api
flavor: latest=true
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Login to image repository
if: github.ref_type == 'tag'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}