Skip to content

Try to fix unknown/unknown arch on ghcr.io #12

Try to fix unknown/unknown arch on ghcr.io

Try to fix unknown/unknown arch on ghcr.io #12

Workflow file for this run

name: docker build
on:
push:
branches:
- develop
- main
- feature/docker
tags:
- v*
jobs:
build:
runs-on: [self-hosted, linux]
permissions:
packages: write
steps:
- 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: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate image tags
id: gen_tags
run: |
if [[ "$GITHUB_REF_NAME" == "develop" ]]; then
TAG="testing"
fi
if [[ "$GITHUB_REF_NAME" == "main" ]]; then
TAG="latest"
fi
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
TAG="${GITHUB_REF/refs\/tags\//}"
fi
if [[ "$TAG" == "" ]]; then
TAG="${GITHUB_REF_NAME/\//-}"
fi
TAGS="nzbgetcom/nzbget:$TAG,ghcr.io/nzbgetcom/nzbget:$TAG"
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5
env:
BUILDX_NO_DEFAULT_ATTESTATIONS:
with:
context: docker
# platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64
push: true
tags: ${{ steps.gen_tags.outputs.tags }}
build-args: |
"NZBGET_RELEASE=${{ github.ref_name }}"
"MAKE_JOBS=2"
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: nzbgetcom/nzbget
readme-filepath: ./docker/README.md