Skip to content

Commit b32eb27

Browse files
Update docker-publish.yml
1 parent e37b45e commit b32eb27

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/docker-publish.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,38 @@ jobs:
2121
- cksolo
2222
- ckstats
2323
- fulcrum
24+
2425
steps:
25-
- name: Checkout repo
26+
- name: 🧾 Checkout repo
2627
uses: actions/checkout@v4
2728

28-
- name: Log in to DockerHub
29+
- name: 🔐 Log in to DockerHub
2930
uses: docker/login-action@v3
3031
with:
3132
username: ${{ secrets.DOCKERHUB_USERNAME }}
3233
password: ${{ secrets.DOCKERHUB_TOKEN }}
3334

34-
- name: Build and push Docker image
35+
- name: 🏷️ Extract metadata (tags, labels)
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/btc-${{ matrix.component }}
40+
tags: |
41+
latest
42+
43+
- name: 🐳 Build and push Docker image
3544
uses: docker/build-push-action@v5
3645
with:
3746
context: ./${{ matrix.component }}
3847
file: ./${{ matrix.component }}/Dockerfile
3948
push: true
40-
tags: |
41-
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/btc-${{ matrix.component }}:latest
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
51+
52+
- name: 📢 Publish README to Docker Hub
53+
uses: peter-evans/docker-description@v4
54+
with:
55+
username: ${{ secrets.DOCKERHUB_USERNAME }}
56+
password: ${{ secrets.DOCKERHUB_TOKEN }}
57+
repository: ${{ env.IMAGE_NAMESPACE }}/btc-${{ matrix.component }}
58+
readme-filepath: ./${{ matrix.component }}/README.md

0 commit comments

Comments
 (0)