Files
mqtt2ws/.github/workflows/docker.yml
T
2022-01-08 19:44:44 +00:00

44 lines
1017 B
YAML

name: Publish Docker image
# To use this workflow:
# * Add secrets CONTAINER_REGISTRY_GITHUB_TOKEN to your GitHub repository
# * Change the IMAGE_NAME to yours
# * Enable automated build if you wish
env:
IMAGE_NAME: mqtt2ws
on:
workflow_dispatch:
## Enable automated build by uncommenting the following lines:
push:
# Publish `main` as Docker `latest` image.
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/mqtt2ws:latest