Skip to content

Build and release Docker #4

Build and release Docker

Build and release Docker #4

name: Build and release Docker
on:
workflow_run:
workflows: ["Build and release binary"]
types:
- completed
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest-16-cores
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get GitHub tag
id: meta
run: |
curl --silent "https://api.github.com/repos/verdexlab/verdex/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: verdexlab/verdex:latest,verdexlab/verdex:${{ steps.meta.outputs.TAG }}
- name: Update DockerHub description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: verdexlab/verdex