v2.3.0 #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docker-build-push-release | |
on: | |
workflow_dispatch: | |
release: | |
types: [published, edited] | |
env: | |
IMAGE_NAME: citygml-tools | |
PLATFORMS: linux/amd64,linux/arm64 | |
jobs: | |
build-push: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Get release version without v | |
id: release_version | |
uses: battila7/get-version-action@v2 | |
- | |
name: set lower case owner name | |
run: | | |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | |
env: | |
OWNER: '${{ github.repository_owner }}' | |
- | |
name: Checkout repo | |
uses: actions/checkout@v4 | |
- | |
name: Docker login Dockerhub | |
id: docker_login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: ${{ env.PLATFORMS }} | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: ${{ env.PLATFORMS }} | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.OWNER_LC }}/${{ env.IMAGE_NAME }} | |
ghcr.io/${{ env.OWNER_LC }}/${{ env.IMAGE_NAME }} | |
flavor: | | |
latest=${{ !github.event.release.prerelease }} | |
tags: | | |
type=semver,pattern={{version}} | |
labels: | | |
maintainer=Claus Nagel | |
[email protected] | |
org.opencontainers.image.authors=Claus Nagel | |
org.opencontainers.image.title=citygml-tools | |
org.opencontainers.image.description=citygml-tools is a command line utility that bundles several operations for processing CityGML files | |
org.opencontainers.image.url=https://github.com/citygml4j/citygml-tools | |
org.opencontainers.image.documentation=https://github.com/citygml4j/citygml-tools#docker | |
org.opencontainers.image.source=https://github.com/citygml4j/citygml-tools | |
- | |
name: Build and publish | |
uses: docker/build-push-action@v5 | |
id: docker_build | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: ${{ env.PLATFORMS }} | |
build-args: | | |
CITYGML_TOOLS_VERSION=${{ steps.release_version.outputs.version }} | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |