Refactor Docker workflow: remove system dependencies installation, update registry credentials, and adjust event conditionals
Some checks failed
build-and-push-docker / docker (push) Failing after 9s

This commit is contained in:
2025-08-18 12:57:35 +00:00
parent 32f5262b93
commit f20ef97230

View File

@@ -15,10 +15,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install system Dependencies
run: |
apt-get update && apt-get install -y curl jq docker.io
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -26,21 +22,21 @@ jobs:
uses: docker/login-action@v3
with:
registry: gitea.purpleraft.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_OWNER }}/${{ env.REGISTRY_REPO }}
images: gitea.purpleraft.com/${{ gitea.repository_owner }}/noisedash
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha
- name: Build (PR only)
if: ${{ github.event_name == 'pull_request' }}
if: ${{ gitea.event_name == 'pull_request' }}
uses: docker/build-push-action@v6
with:
context: .
@@ -50,12 +46,12 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push (branches/tags)
if: ${{ github.event_name != 'pull_request' }}
if: ${{ gitea.event_name != 'pull_request' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}