Anything that describes or acts on *this* repository now points here. Attribution to the upstream authors is deliberately left untouched. Functional, would otherwise misbehave on this fork: - Docker workflows pushed to a ghcr namespace this account cannot write to. - scripts/run_jmusicbot.sh auto-updated from arif-banai's releases, so it would have replaced this jar with the upstream one. - pom.xml scm/issueManagement/ciManagement described the upstream repo. - Removed .github/FUNDING.yml, which put a Sponsor button on this repo that funded arif-banai. Cosmetic: - Badges repointed; dropped the CircleCI, CodeFactor and Discord badges, which reported on services this fork is not registered with. - License badge now targets main rather than master. - Fixed the README header image: it was a float-right <img> that overlapped the note block, now centred above the title with alt text. - Refreshed the stale JMusicBot-0.6.2 jar name in the run examples. Left alone on purpose: copyright headers, pom.xml <developers>, the NOTICE and README credit tables, and the upstream commit provenance in docs/ARCHITECTURE.md.
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
name: 'Docker Build and Push'
|
|
description: 'Builds and pushes a multi-arch Docker image to GHCR with caching'
|
|
|
|
inputs:
|
|
tags:
|
|
description: 'Docker image tags (from metadata-action)'
|
|
required: true
|
|
annotations:
|
|
description: 'OCI annotations from metadata-action (for multi-arch images)'
|
|
required: true
|
|
timestamp:
|
|
description: 'Build timestamp in ISO 8601 format'
|
|
required: true
|
|
registry:
|
|
description: 'Container registry (e.g., ghcr.io)'
|
|
required: false
|
|
default: 'ghcr.io'
|
|
image-name:
|
|
description: 'Image name (e.g., purnell569/musicbot)'
|
|
required: false
|
|
default: 'purnell569/musicbot'
|
|
token:
|
|
description: 'GitHub token for authentication'
|
|
required: true
|
|
|
|
outputs:
|
|
digest:
|
|
description: 'Docker image digest'
|
|
value: ${{ steps.build.outputs.digest }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
driver-opts: |
|
|
network=host
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ inputs.registry }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ inputs.token }}
|
|
|
|
- name: Build and push Docker image
|
|
id: build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: ${{ inputs.tags }}
|
|
annotations: ${{ inputs.annotations }}
|
|
cache-from: |
|
|
type=gha
|
|
type=registry,ref=${{ inputs.registry }}/${{ inputs.image-name }}:buildcache
|
|
cache-to: |
|
|
type=gha,mode=max
|
|
type=registry,ref=${{ inputs.registry }}/${{ inputs.image-name }}:buildcache,mode=max
|
|
platforms: linux/amd64,linux/arm64
|
|
build-args: |
|
|
BUILD_TIMESTAMP=${{ inputs.timestamp }}
|
|
|
|
- name: Image digest
|
|
shell: bash
|
|
run: echo "Image pushed with digest ${{ steps.build.outputs.digest }}"
|