Skip to content

Test action

Test action #7

Workflow file for this run

name: Publish
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
- '.github/**'
jobs:
docker-publish:
name: Publish to GitHub Container Registry
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Write version
uses: DamianReeves/write-file-action@master
with:
path: ./VERSION
contents: |
${{ steps.tag_version.outputs.new_tag }}
write-mode: overwrite
- name: Set up QEMU
id: qemu
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64,linux/armv7,linux/riscv64
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: build
uses: docker/[email protected]
with:
context: .
push: true
platforms: ${{ steps.qemu.outputs.platforms }}
tags: |
ghcr.io/danclough/amcrest2mqtt:latest
ghcr.io/danclough/amcrest2mqtt:${{ steps.tag_version.outputs.new_tag }}
labels: "version=${{ steps.tag_version.outputs.new_tag }}"