Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Update docker-publish-arm.yaml

Katos483934bd5e9a
diff --git a/.github/workflows/docker-publish-arm.yaml b/.github/workflows/docker-publish-arm.yaml
index c5e09196..45714d25 100644
--- a/.github/workflows/docker-publish-arm.yaml
+++ b/.github/workflows/docker-publish-arm.yaml
@@ -37,26 +37,23 @@ jobs:
permissions:
contents: read
packages: write
- # This is used to complete the identity challenge
- # with sigstore/fulcio when running outside of PRs.
attestations: write
id-token: write
steps:
+ # Step 1: Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
- # Set up BuildKit Docker container builder to be able to build
- # multi-platform images and export cache
- # https://github.com/docker/setup-buildx-action
+ # Step 2: Set up Buildx without specifying driver
+ # Let it use default settings to avoid the 'no remote endpoint' issue
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
- driver: docker-container # Use remote driver for parallel builds and improved performance
- buildkitd-flags: --allow-insecure-entitlements security # Enable required security entitlements for remote driver
+ install: true # Ensure Buildx is installed and set up properly
+ use: true # Use Buildx instance directly for this job
- # Login against a Docker registry except on PR
- # https://github.com/docker/login-action
+ # Step 3: Login against Docker registry except on PR
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/[email protected]
@@ -65,20 +62,18 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- # Extract metadata (tags, labels) for Docker
- # https://github.com/docker/metadata-action
+ # Step 4: Extract metadata for Docker images
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
- type=semver,pattern={{version}} # Tag based on version
- type=semver,pattern={{major}}.{{minor}} # Tag based on major and minor versions
- type=schedule,pattern=nightly # Add nightly builds for scheduled builds
+ type=semver,pattern={{version}}
+ type=semver,pattern={{major}}.{{minor}}
+ type=schedule,pattern=nightly
- # Build and push Docker image with Buildx (don't push on PR)
- # https://github.com/docker/build-push-action
+ # Step 5: Build and push the Docker image
- name: Build and push Docker image
id: build-and-push
uses: docker/[email protected]
@@ -87,15 +82,14 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- platforms: linux/arm64,linux/arm/v7 # Build for both ARM64 and ARMv7 architectures
- cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache # Use registry-based caching for better cross-platform support
- cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache # Store the cache in the registry for faster builds
+ platforms: linux/arm64,linux/arm/v7
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
build-args: |
- VERSION=${{ github.ref_name }} # Pass version as a build argument
- COMMIT=${{ github.sha }} # Pass commit SHA as a build argument
-
- # Attest the built image to prove build provenance
- # https://github.com/actions/attest-build-provenance
+ VERSION=${{ github.ref_name }}
+ COMMIT=${{ github.sha }}
+
+ # Step 6: Attest built image to prove build provenance
- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
@@ -103,4 +97,4 @@ jobs:
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build-and-push.outputs.digest }}
- push-to-registry: true # Push the attestation to the registry
+ push-to-registry: true