Skip to content

Fix NPE

Fix NPE #229

Workflow file for this run

name: Build and publish Docker images
on:
push:
tags:
- "*"
branches:
- "dev"
workflow_dispatch:
env:
DOCKER_TAG: ${{ startsWith(github.ref, 'refs/tags') && 'latest' || 'dev' }}
jobs:
build_and_push:
strategy:
matrix:
platform:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: "${{ vars.DOCKERHUB_REPO }}:${{ env.DOCKER_TAG }}-${{ matrix.platform.arch }}"
context: .
merge:
runs-on: ubuntu-latest
needs:
- build_and_push
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Do the manifest thing
run: |
docker manifest create ${{ vars.DOCKERHUB_REPO }}:$DOCKER_TAG --amend ${{ vars.DOCKERHUB_REPO }}:$DOCKER_TAG-amd64 --amend ${{ vars.DOCKERHUB_REPO }}:$DOCKER_TAG-arm64
docker manifest push ${{ vars.DOCKERHUB_REPO }}:$DOCKER_TAG