From d6a1d8090ec657880a53d69c2eaa022d2a99aa5d Mon Sep 17 00:00:00 2001 From: Worph Date: Wed, 1 Jul 2026 22:45:09 +0200 Subject: [PATCH] workflow fix --- .../{docker-publish.yml => publish.yml} | 50 ++++++------------- 1 file changed, 16 insertions(+), 34 deletions(-) rename .github/workflows/{docker-publish.yml => publish.yml} (55%) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/publish.yml similarity index 55% rename from .github/workflows/docker-publish.yml rename to .github/workflows/publish.yml index cf6158d..92598e0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/publish.yml @@ -1,77 +1,59 @@ -name: Build and Publish Docker Image +name: Publish image +# Build and push the feeder image to the GitHub Container Registry (ghcr.io): +# * every push to main -> the moving `main` tag +# * every `v*` tag -> semver tags (e.g. v1.0.0 -> 1.0.0, 1.0, 1) +# The build context is the repo root (the workspace) so the vendored +# `meta-feeder-sdk` path dependency resolves; the Dockerfile lives under +# feeder-plugin/tribler-feeder/. on: push: - branches: - - main - tags: - - 'v*' - pull_request: - branches: - - main - workflow_dispatch: + branches: [main] + tags: ['v*'] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: - build-and-push: + publish: runs-on: ubuntu-latest permissions: contents: read packages: write - steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@v4 - - name: Free disk space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Container Registry + - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) + - name: Extract image metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch - type=ref,event=pr - type=sha type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=raw,value=latest,enable={{is_default_branch}} + type=sha,format=short - - name: Build and push Docker image + - name: Build and push uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + file: ./feeder-plugin/tribler-feeder/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - provenance: false cache-from: type=gha cache-to: type=gha,mode=max