Automate Docker Image Release Workflow with Updated GitHub Actions #2379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I keep finding myself wanting the latest & greatest image based on the latest release, but sometimes they lag a day or two. It's a small thing, but my inner DevOps felt the maintainer's pain.
Maintainer Tag
@HenryHengZJ
Overview
This pull request updates the
.github/workflows/docker-image.yml
file to enhance the automation of Docker image creation and pushing using GitHub Actions. The workflow ensures accurate tagging and streamlined publishing processes through better triggers and action upgrades.Changes Made
Workflow Triggers:
release
event with type[published]
.workflow_dispatch
trigger remains available for manual execution, providing input parameters for Node.js (node_version
) and Docker image (tag_version
).Upgraded GitHub Actions:
v4.1.5
for better source code checkout.v3.0.0
for enabling cross-platform builds.v3.3.0
for improved multi-platform support.docker/login-action@v3.1.0
to enhance Docker Hub login security.Accurate SEMVER Version Extraction:
release
event) or manual input (workflow_dispatch
), ensuring consistent tagging for Docker images.Optimized Image Building and Caching:
Rationale
Automating the Docker image build and push process on release publication improves consistency and reduces manual work, while the upgraded actions and accurate tagging enhance reliability and efficiency.
Impact
This update ensures consistent tagging and pushing of Docker images to Docker Hub, providing developers with a streamlined and reliable CI/CD workflow.
Additional Notes
This description was AI-assisted via OpenAI's agent developed by Nikolay Stankov and prototyped in Flowise.