Skip to content

Commit

Permalink
fix workflow again and readd docker image build
Browse files Browse the repository at this point in the history
  • Loading branch information
miaucl committed Sep 14, 2024
1 parent a502521 commit 9c86532
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,48 @@ jobs:
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-ghcr:
name: Publish Docker Image to Container Registry
needs: check_version
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/miaucl/docker2mqtt
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: miaucl
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v6
with:
file: Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

github-release:
name: >-
Create GitHub release and attach binaries
needs:
- publish-to-pypi
- publish-to-ghcr
runs-on: ubuntu-latest

permissions:
Expand Down

0 comments on commit 9c86532

Please sign in to comment.