Skip to content
name: Publish HABApp distributions to dockerhub
on:
release:
types: [published]
push:
branches:
- master
jobs:
buildx:
runs-on: ubuntu-latest
environment: dockerhub
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push release
id: docker_build_release
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
spacemanspiff2007/habapp:latest
spacemanspiff2007/habapp:${{ github.ref_name }}
if: github.ref_type == 'tag'
- name: Build and push latest
id: docker_build_latest
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
spacemanspiff2007/habapp:master
if: github.ref_type == 'branch'
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}