Skip to content

Commit 82d0f77

Browse files
authored
chore: Display more information when publishing to docker (#732)
1 parent 444d212 commit 82d0f77

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

.github/workflows/publish-docker-image.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
options:
1414
- 'yes'
1515
- 'no'
16-
default: 'no'
16+
default: 'yes'
1717
required: false
1818
ref:
1919
description: 'Reference / tag to publish'
@@ -40,18 +40,18 @@ jobs:
4040
runs-on: ubuntu-latest
4141

4242
env:
43-
DEBUG: ${{ github.event.inputs.dryRun == 'yes'}}
43+
DEBUG: ${{ inputs.dryRun == 'yes'}}
4444

4545
steps:
4646
- name: Checkout repository
4747
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4848
with:
49-
ref: ${{ github.event.inputs.ref || github.ref }}
49+
ref: ${{ inputs.ref || github.ref }}
5050

5151
- name: CSpell Version
52+
id: cspell-version
5253
run: |
53-
export CSPELL_VERSION=$(jq -r ".dependencies.cspell | sub(\"[_^]\"; \"\")" package.json)
54-
echo CSPELL_VERSION=$CSPELL_VERSION >> $GITHUB_ENV
54+
echo CSPELL_VERSION=$(jq -r ".dependencies.cspell | sub(\"[_^]\"; \"\")" package.json) >> "$GITHUB_OUTPUT"
5555
5656
- name: Log in to the Container registry
5757
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
@@ -66,15 +66,15 @@ jobs:
6666
with:
6767
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6868
tags: |
69-
type=semver,pattern={{version}},value=${{ env.CSPELL_VERSION }}
69+
type=semver,pattern={{version}},value=${{ steps.cspell-version.outputs.CSPELL_VERSION }}
7070
labels: |
7171
org.opencontainers.image.title=cspell
7272
org.opencontainers.image.description=CSpell command line spell checker for code and other documents.
7373
org.opencontainers.image.vendor=Street Side Software
7474
7575
- name: Log Docker metadata
7676
env:
77-
META: $${{ toJSON(steps.meta.outputs) }}
77+
META: ${{ toJSON(steps.meta.outputs) }}
7878
run: echo "$META"
7979

8080
- name: Build and push Docker image
@@ -85,4 +85,20 @@ jobs:
8585
push: true
8686
tags: ${{ steps.meta.outputs.tags }}
8787
labels: ${{ steps.meta.outputs.labels }}
88+
89+
- name: Summary
90+
uses: streetsidesoftware/actions/public/summary@v1
91+
with:
92+
text: |
93+
## Published Docker Image 🚀
94+
95+
- **CSpell Library Version:** ${{ steps.cspell-version.outputs.CSPELL_VERSION }}
96+
- **Docker Image:** ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
97+
- **Tags:** ${{ steps.meta.outputs.tags }}
98+
- **Labels:** ${{ steps.meta.outputs.labels }}
99+
- **ref:** ${{ inputs.ref }}
100+
- **github.ref:** ${{ github.ref }}
101+
- **Dry Run:** ${{ inputs.dryRun }}
102+
- **Debug:** ${{ env.DEBUG }}
103+
88104
# cspell:ignore opencontainers

0 commit comments

Comments
 (0)