You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
docker-publish:
|
|
name: Publish to Docker Hub
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2.4.0
|
|
- name: Bump version
|
|
uses: chamini2/bump-version@js
|
|
id: version
|
|
with:
|
|
version_file: ./VERSION
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2.4.0
|
|
with:
|
|
ref: main
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1.2.0
|
|
with:
|
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1.6.0
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1.10.0
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v2.7.0
|
|
with:
|
|
context: .
|
|
push: true
|
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
|
|
tags: |
|
|
dchesterton/amcrest2mqtt:latest
|
|
dchesterton/amcrest2mqtt:${{ steps.version.outputs.version }}
|
|
labels: "version=${{ steps.version.outputs.version }}"
|