--- lbbs/.github/workflows/docker-image.yml 2026/01/18 09:14:05 1.4 +++ lbbs/.github/workflows/docker-image.yml 2026/01/24 15:26:22 1.5 @@ -4,6 +4,10 @@ on: push: branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd @@ -17,12 +21,24 @@ 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: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.BBSD_IMAGE }} + - name: Build the Docker image id: build-bbsd uses: docker/build-push-action@v5 @@ -31,5 +47,7 @@ jobs: context: . file: Dockerfile/dockerfile.bbsd tags: | - ${{ env.BBSD_IMAGE }}:dev + ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache