Skip to content

Update env vars#28

Merged
javidahmed64592 merged 3 commits intomainfrom
update-env-vars
Mar 6, 2026
Merged

Update env vars#28
javidahmed64592 merged 3 commits intomainfrom
update-env-vars

Conversation

@javidahmed64592
Copy link
Owner

@javidahmed64592 javidahmed64592 commented Mar 6, 2026

This pull request refactors how the PACKAGE_NAME environment variable is set and improves workflow conditional logic for GitHub Actions. Instead of hardcoding or setting PACKAGE_NAME in workflow files, a new reusable action is introduced to derive it automatically from the repository name. Additionally, all workflow and action files update their conditionals to use github.event.repository.name for better reliability and portability.

Key improvements include:

Environment Variable Management

  • Added a new composite action set-package-name (.github/actions/setup/set-package-name/action.yml) that sets the PACKAGE_NAME environment variable by replacing hyphens with underscores in the repository name, making this process reusable and less error-prone.
  • Updated workflow files (build.yml, ci.yml) to use the new set-package-name action instead of hardcoded env values, and documented its usage in docs/WORKFLOWS.md. [1] [2] [3] [4] [5] [6]

Conditional Logic Improvements

  • Refactored all workflow and action files to use github.event.repository.name for conditional steps, replacing the previous github.repository checks, which improves compatibility for forks and external repositories. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Documentation Updates

  • Updated docs/WORKFLOWS.md to reflect the new way of setting PACKAGE_NAME, including example usage for the new action and removing outdated environment variable instructions. [1] [2] [3] [4]

These changes make the workflows more maintainable, reusable, and robust for different repository contexts.

@javidahmed64592 javidahmed64592 merged commit fe73b79 into main Mar 6, 2026
9 checks passed
@javidahmed64592 javidahmed64592 deleted the update-env-vars branch March 6, 2026 01:02
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.

1 participant