Skip to content

Docker release

Docker release #181

Workflow file for this run

name: Docker release
on:
release:
type:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION_TAG=${TAG#v}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7,linux/riscv64
push: true
labels: |
org.opencontainers.image.created:${{ github.event.release.created_at }}
org.opencontainers.image.revision:${{ github.sha }}
org.opencontainers.image.version:${{ github.event.release.tag_name }}
tags: |
docker.io/kilna/envhttpd:${{ env.VERSION_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: kilna/envhttpd
short-description: ${{ github.event.repository.description }}