Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate Docker Image Release Workflow with Updated GitHub Actions #2379

Merged
merged 0 commits into from
May 13, 2024

Conversation

nstankov-bg
Copy link
Contributor

@nstankov-bg nstankov-bg commented May 9, 2024

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

  1. Workflow Triggers:

    • Release Trigger: The workflow will automatically execute when a new release is published, utilizing the release event with type [published].
    • Manual Trigger: The workflow_dispatch trigger remains available for manual execution, providing input parameters for Node.js (node_version) and Docker image (tag_version).
  2. Upgraded GitHub Actions:

    • Checkout Action: Now uses v4.1.5 for better source code checkout.
    • QEMU and Buildx Setup:
      • QEMU action at v3.0.0 for enabling cross-platform builds.
      • Docker Buildx action upgraded to v3.3.0 for improved multi-platform support.
    • Docker Login: Upgraded to docker/login-action@v3.1.0 to enhance Docker Hub login security.
  3. Accurate SEMVER Version Extraction:

    • Enhanced logic extracts the SEMVER version number from either the release tag (release event) or manual input (workflow_dispatch), ensuring consistent tagging for Docker images.
  4. Optimized Image Building and Caching:

    • The build and push step uses caching to optimize build times and correctly tags images based on the extracted SEMVER value.

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.

@nstankov-bg nstankov-bg marked this pull request as ready for review May 9, 2024 16:46
@nstankov-bg
Copy link
Contributor Author

Giving it more thought, it would make sense to also auto tag latest.

@HenryHengZJ HenryHengZJ merged commit ee9d3a3 into FlowiseAI:main May 13, 2024
2 checks passed
@HenryHengZJ
Copy link
Contributor

@nstankov-bg hmm strange why it doesn't contains any file changes

@nstankov-bg
Copy link
Contributor Author

@HenryHengZJ

Because pull bot did something to overwrite it. I will adjust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants