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

Modularize workflows by creating reusable GitHub Actions #356

Merged
merged 26 commits into from
Mar 18, 2025

Conversation

mamu0
Copy link
Contributor

@mamu0 mamu0 commented Mar 14, 2025

This PR introduces some new GitHub Actions and modifies existing workflows to use them. The main goal was to reduce code duplication across workflows by extracting common functionality into reusable actions.

Actions created:

  • azure-login: For standardized authentication with Azure
  • terraform-setup: For Terraform version configuration
  • upload-artifact: For uploading artifacts in pipelines
  • download-artifact: For downloading artifacts in pipelines
  • node-setup: For configuring Node.js environment
  • get-all-modules and get-modified-modules: For managing Terraform modules
  • slack-notification: For sending on slack channel a notification

Other changes:

  • Improved get-terraform-version action with new terraform version input
  • renamed cdn-code-deploy to maintein convention
  • deleted get_terraform_version.yaml, get_all_modules.yaml and get_modified_modules.yaml workflow to use new actions

Benefits:

  • Easier maintenance: changes in a single point instead of multiple workflows (E.g. the commit sha)
  • Consistent behavior across different workflows
  • Cleaner and more readable code
  • Easier to add new workflows that reuse the same functionality

Resolves: CES-737

@mamu0 mamu0 added the priority label Mar 14, 2025
@mamu0 mamu0 requested a review from a team as a code owner March 14, 2025 13:06
Copy link

changeset-bot bot commented Mar 14, 2025

⚠️ No Changeset found

Latest commit: e9c6ffe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@gunzip gunzip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: are the deleted files referenced somewhere?

@mamu0
Copy link
Contributor Author

mamu0 commented Mar 14, 2025

question: are the deleted files referenced somewhere?

no, two were used improperly, as they were two actions made as workflow, so I converted and replaced them, one was unused and had already been converted back into an action

@gunzip gunzip self-requested a review March 17, 2025 13:06
@mamu0 mamu0 enabled auto-merge (squash) March 18, 2025 11:07
@lucacavallaro lucacavallaro self-requested a review March 18, 2025 11:55
@mamu0 mamu0 merged commit db1f984 into main Mar 18, 2025
3 checks passed
@mamu0 mamu0 deleted the feats/make-modular-workflows-with-actions branch March 18, 2025 11:55
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.

5 participants