| 2 |
|
|
| 3 |
on: |
on: |
| 4 |
push: |
push: |
| 5 |
branches: [ "main" ] |
branches: |
| 6 |
|
- "v*.*" |
| 7 |
|
|
| 8 |
|
concurrency: |
| 9 |
|
group: ${{ github.workflow }}-${{ github.ref }} |
| 10 |
|
cancel-in-progress: true |
| 11 |
|
|
| 12 |
env: |
env: |
| 13 |
DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 |
DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 |
| 22 |
steps: |
steps: |
| 23 |
- uses: actions/checkout@v4 |
- uses: actions/checkout@v4 |
| 24 |
|
|
| 25 |
|
- name: Log in to Docker Hub |
| 26 |
|
uses: docker/login-action@v3 |
| 27 |
|
with: |
| 28 |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 29 |
|
password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 30 |
|
|
| 31 |
- name: Set up QEMU |
- name: Set up QEMU |
| 32 |
uses: docker/setup-qemu-action@v3 |
uses: docker/setup-qemu-action@v3 |
| 33 |
|
|
| 34 |
- name: Set up Docker Buildx |
- name: Set up Docker Buildx |
| 35 |
uses: docker/setup-buildx-action@v3 |
uses: docker/setup-buildx-action@v3 |
| 36 |
|
|
| 37 |
- name: Build the Docker image |
- name: Extract Docker metadata (bbsd) |
| 38 |
|
id: meta-bbsd |
| 39 |
|
uses: docker/metadata-action@v5 |
| 40 |
|
with: |
| 41 |
|
images: ${{ env.BBSD_IMAGE }} |
| 42 |
|
|
| 43 |
|
- name: Build the Docker image (bbsd) |
| 44 |
id: build-bbsd |
id: build-bbsd |
| 45 |
uses: docker/build-push-action@v5 |
uses: docker/build-push-action@v5 |
| 46 |
with: |
with: |
| 48 |
context: . |
context: . |
| 49 |
file: Dockerfile/dockerfile.bbsd |
file: Dockerfile/dockerfile.bbsd |
| 50 |
tags: | |
tags: | |
| 51 |
${{ env.BBSD_IMAGE }}:dev |
${{ steps.meta-bbsd.outputs.tags }} |
| 52 |
labels: ${{ steps.meta.outputs.labels }} |
labels: ${{ steps.meta-bbsd.outputs.labels }} |
| 53 |
|
cache-from: type=gha # Pull cache from GitHub Actions cache |
| 54 |
|
cache-to: type=gha,mode=max # Push cache to GitHub Actions cache |