mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-21 00:05:35 +02:00
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
name: BUILDX TEST
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- '**/*'
|
|
- '!README.md'
|
|
- '!CONTRIBUTE.md'
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
build-main:
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: '.'
|
|
|
|
env:
|
|
IMAGE_NAME: ghcr.io/manimatter/decluttarr
|
|
IMAGE_TAG: maintestX
|
|
|
|
steps:
|
|
- name: 'Checkout GitHub Action'
|
|
uses: actions/checkout@main
|
|
|
|
# - name: Set up QEMU
|
|
# uses: docker/setup-qemu-action@v3
|
|
|
|
# - name: Set up Docker Buildx
|
|
# uses: docker/setup-buildx-action@v3
|
|
|
|
- name: 'Login to GitHub Container Registry'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
- name: Store short Commit ID in env variable
|
|
id: vars
|
|
run: |
|
|
calculatedSha=$(git rev-parse --short ${{ github.sha }})
|
|
echo "SHORT_COMMIT_ID=$calculatedSha" >> $GITHUB_ENV
|
|
|
|
# - name: "Build, Tag, and push the Docker image"
|
|
# run: |
|
|
# docker buildx build \
|
|
# --platform linux/amd64 \
|
|
# -f docker/Dockerfile . \
|
|
# --progress plain \
|
|
# -t $IMAGE_NAME:$IMAGE_TAG \
|
|
# --label com.decluttarr.version=$IMAGE_TAG \
|
|
# --label com.decluttarr.commit=$SHORT_COMMIT_ID \
|
|
# # --annotation "image=$IMAGE_TAG-amd64" \
|
|
# --build-arg IMAGE_TAG=$IMAGE_TAG \
|
|
# --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \
|
|
# --push \
|
|
|
|
# - name: Add architecture-specific labels
|
|
# run: |
|
|
# # # Get the manifest digest for the image
|
|
# # manifest_digest_amd64=$(docker manifest inspect "$IMAGE_NAME:$IMAGE_TAG" | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
|
|
# # echo "Manifest digest for amd64: $manifest_digest_amd64"
|
|
|
|
- name: Tag and push amd64 image
|
|
run: |
|
|
docker images --format "{{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.CreatedAt}}" | sort -rk4
|
|
|
|
# Retrieve Docker image ID
|
|
IMAGE_ID=$(docker images --filter=reference="$IMAGE_NAME:$IMAGE_TAG" --quiet)
|
|
echo "Docker Image ID: $IMAGE_ID"
|
|
|
|
docker tag ghcr.io/manimatter/decluttarr:maintestx@sha256:389494656cd076f532bcd59bc459e024295ea88cb450237f3f91243df3412282 ghcr.io/manimatter/decluttarr:maintestx-amd64
|
|
docker push ghcr.io/manimatter/decluttarr:maintestx-amd64
|
|
|
|
|
|
|
|
|
|
|