1
0
Fork 0

Merging upstream version 0.8.14.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-06-06 05:02:55 +02:00
parent 0717eaffc4
commit a113feda99
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
3 changed files with 78 additions and 1 deletions

View file

@ -0,0 +1,65 @@
name: Create and push Docker manifests
on:
workflow_call:
jobs:
Run:
name: Create and push Docker manifests
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
env:
CGO_ENABLED: 0
steps:
- name: Enable experimental Docker features
run: |
mkdir -p ~/.docker/ && \
echo '{"experimental": "enabled"}' > ~/.docker/config.json
- name: Create and push Docker manifests
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GHCR_USER: ${{ secrets.BOT_USERNAME }}
GHCR_TOKEN: ${{ secrets.BOT_GHCR_PAT }}
run: |
# Login to Docker Hub and GHCR (redundant but ensures manifest push works)
echo "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USER" --password-stdin
echo "$GHCR_TOKEN" | docker login ghcr.io -u "$GHCR_USER" --password-stdin
# Get the tag without the 'v' prefix
TAG="${GITHUB_REF_NAME#v}"
# Architectures to include in manifests
ARCHES=("amd64" "i386" "armhf" "arm64v8")
# Function to create and push manifests
create_and_push_manifest() {
local repo="$1"
local tag="$2"
local manifest="${repo}:${tag}"
local images=()
# Collect images for the manifest
for arch in "${ARCHES[@]}"; do
images+=("${repo}:${arch}-${tag}")
done
# Create the manifest
docker manifest create "$manifest" "${images[@]}"
# Push the manifest
docker manifest push "$manifest"
}
# Create and push manifests for Docker Hub
create_and_push_manifest "nickfedor/shoutrrr" "latest"
create_and_push_manifest "nickfedor/shoutrrr" "$TAG"
# Create and push manifests for GHCR
create_and_push_manifest "ghcr.io/nicholas-fedor/shoutrrr" "latest"
create_and_push_manifest "ghcr.io/nicholas-fedor/shoutrrr" "$TAG"

View file

@ -26,7 +26,19 @@ jobs:
- lint
- test
generate-manifests:
uses: ./.github/workflows/generate-manifests.yaml
needs:
- build
secrets: inherit
permissions:
packages: write
contents: read
attestations: write
id-token: write
update-go-docs:
uses: ./.github/workflows/update-go-docs.yaml
needs:
- build
- generate-manifests

View file

@ -1,4 +1,4 @@
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c AS alpine
FROM alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715 AS alpine
RUN apk add --no-cache ca-certificates