--- lbbs/.github/workflows/docker-image.yml 2026/01/10 06:53:46 1.3 +++ lbbs/.github/workflows/docker-image.yml 2026/01/28 14:39:57 1.6 @@ -2,9 +2,12 @@ name: Docker Image CI on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: + - "v*.*" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 @@ -19,13 +22,25 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Build the Docker image + + - name: Extract Docker metadata (bbsd) + id: meta-bbsd + uses: docker/metadata-action@v5 + with: + images: ${{ env.BBSD_IMAGE }} + + - name: Build the Docker image (bbsd) id: build-bbsd uses: docker/build-push-action@v5 with: @@ -33,5 +48,7 @@ jobs: context: . file: Dockerfile/dockerfile.bbsd tags: | - ${{ env.BBSD_IMAGE }}:dev - labels: ${{ steps.meta.outputs.labels }} + ${{ steps.meta-bbsd.outputs.tags }} + labels: ${{ steps.meta-bbsd.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache