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