Skip to content

feat: Add historical tagging and use build-push-action for Docker image build and push#187

Merged
Roopan-Microsoft merged 5 commits into
devfrom
feature/psl-conregchanges
May 7, 2025
Merged

feat: Add historical tagging and use build-push-action for Docker image build and push#187
Roopan-Microsoft merged 5 commits into
devfrom
feature/psl-conregchanges

Conversation

@Abdul-Microsoft

Copy link
Copy Markdown
Contributor

This pull request updates the .github/workflows/docker-build-and-push.yml file to improve the Docker build and push process by introducing historical tagging, modularizing the workflow, and enhancing readability. The most important changes include adding historical tags for Docker images, splitting backend and frontend build steps, and replacing inline shell scripts with reusable GitHub Actions.

Workflow improvements:

  • Historical Tagging for Docker Images: Introduced a HISTORICAL_TAG environment variable that combines the branch-based tag, the current date, and the GitHub run ID to create unique historical tags for Docker images.

  • Modularized Backend and Frontend Builds: Replaced the monolithic Docker build-and-push script with separate steps for backend and frontend builds, using docker/build-push-action@v6 for better modularity and maintainability. Each step now supports conditional pushing based on the TAG.

Code simplification:

  • Removed Redundant Conditions: Simplified the conditional check for logging into Azure Container Registry by removing unnecessary parentheses around the if condition.

  • Added Date Retrieval Step: Added a dedicated step to retrieve the current date and store it in the GitHub Actions output, improving clarity and reusability.## Purpose

  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit 243a6cf into dev May 7, 2025
6 of 8 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the feature/psl-conregchanges branch May 7, 2025 10:59
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

blessing-msft pushed a commit that referenced this pull request Aug 1, 2025
feat: Add historical tagging and use build-push-action for Docker image build and push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants