Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
options:
- 'yes'
- 'no'
default: 'no'
default: 'yes'
required: false
ref:
description: 'Reference / tag to publish'
Expand All @@ -40,18 +40,18 @@ jobs:
runs-on: ubuntu-latest

env:
DEBUG: ${{ github.event.inputs.dryRun == 'yes'}}
DEBUG: ${{ inputs.dryRun == 'yes'}}

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ github.event.inputs.ref || github.ref }}
ref: ${{ inputs.ref || github.ref }}

- name: CSpell Version
id: cspell-version
run: |
export CSPELL_VERSION=$(jq -r ".dependencies.cspell | sub(\"[_^]\"; \"\")" package.json)
echo CSPELL_VERSION=$CSPELL_VERSION >> $GITHUB_ENV
echo CSPELL_VERSION=$(jq -r ".dependencies.cspell | sub(\"[_^]\"; \"\")" package.json) >> "$GITHUB_OUTPUT"

- name: Log in to the Container registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
Expand All @@ -66,15 +66,15 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ env.CSPELL_VERSION }}
type=semver,pattern={{version}},value=${{ steps.cspell-version.outputs.CSPELL_VERSION }}
labels: |
org.opencontainers.image.title=cspell
org.opencontainers.image.description=CSpell command line spell checker for code and other documents.
org.opencontainers.image.vendor=Street Side Software

- name: Log Docker metadata
env:
META: $${{ toJSON(steps.meta.outputs) }}
META: ${{ toJSON(steps.meta.outputs) }}
run: echo "$META"

- name: Build and push Docker image
Expand All @@ -85,4 +85,20 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Summary
uses: streetsidesoftware/actions/public/summary@v1
with:
text: |
## Published Docker Image 🚀

- **CSpell Library Version:** ${{ steps.cspell-version.outputs.CSPELL_VERSION }}
- **Docker Image:** ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- **Tags:** ${{ steps.meta.outputs.tags }}
- **Labels:** ${{ steps.meta.outputs.labels }}
- **ref:** ${{ inputs.ref }}
- **github.ref:** ${{ github.ref }}
- **Dry Run:** ${{ inputs.dryRun }}
- **Debug:** ${{ env.DEBUG }}

# cspell:ignore opencontainers