Update .gitea/workflows/docker-publish.yaml
Some checks failed
Docker Build and Publish / Build Docker image amd publish to Gitea (push) Has been cancelled

This commit is contained in:
2025-08-23 09:14:37 -04:00
parent 5e8e658651
commit 3f521b2fde

View File

@@ -21,7 +21,7 @@ jobs:
## define job to build and publish docker image ## define job to build and publish docker image
build-and-push-docker-image: build-and-push-docker-image:
name: Build Docker image amd publish to Gitea name: Build Docker image amd publish to Gitea
runs-on: runner1 runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
@@ -31,49 +31,32 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
## https://github.com/docker/build-push-action ## https://github.com/docker/build-push-action
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
## https://github.com/docker/login-action ## https://github.com/docker/login-action
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
if: github.event_name != 'pull_request' uses: docker/login-action@v3
uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: gitea.sdgarren.com
username: ${{ github.actor }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
# ## https://github.com/docker/metadata-action
# - name: Extract Docker metadata
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: docker.io/caddy
# tags: |
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
# flavor: |
# latest=true
## https://github.com/docker/build-push-action ## https://github.com/docker/build-push-action
- name: Build and push Docker image - name: Build and push Docker image
id: build-and-push id: build-and-push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v5
with: with:
provenance: false provenance: false
context: . context: .
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }} push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
tags: | tags: |
ghcr.io/${{ env.IMAGE_NAME }}:latest gitea.sdgarren.com/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Image digest - name: Image digest
run: echo ${{ steps.build-and-push.outputs.digest }} run: echo ${{ steps.build-and-push.outputs.digest }}