Skip to content

Publish Docker Image #3

Publish Docker Image

Publish Docker Image #3

Workflow file for this run

name: Publish Docker Image
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata (tags, labels)
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/matthewlarner/inception-mqtt
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/matthewlarner/inception-mqtt:latest
ghcr.io/matthewlarner/inception-mqtt:${{ github.event.release.tag_name }}