Skip to content

Conversation

@gustaavik
Copy link
Member

This pull request updates the .github/workflows/release.yml file to improve flexibility and security in the Docker image publishing workflow. The changes primarily involve using dynamic values for the image name, updating credentials, and ensuring the repository name is properly formatted.

Workflow improvements:

  • Updated IMAGE_NAME to dynamically use the GitHub repository name instead of a hardcoded value, enhancing flexibility for different repositories. ([.github/workflows/release.ymlL9-L18](https://github.com/Zenfulcode/CommercifyGO/pull/48/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L9-L18))
  • Changed Docker login credentials to use GHCR_TOKEN if available, falling back to GITHUB_TOKEN for improved security and compatibility. ([.github/workflows/release.ymlL31-R40](https://github.com/Zenfulcode/CommercifyGO/pull/48/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L31-R40))
  • Added a step to convert the repository name to lowercase and save it as an environment variable (IMAGE_NAME_LOWER) for consistent Docker image naming. ([.github/workflows/release.ymlL31-R40](https://github.com/Zenfulcode/CommercifyGO/pull/48/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L31-R40))

Metadata adjustments:

  • Updated the images parameter in the Docker metadata action to use the new IMAGE_NAME_LOWER environment variable, ensuring proper formatting for image tags and labels. ([.github/workflows/release.ymlL31-R40](https://github.com/Zenfulcode/CommercifyGO/pull/48/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L31-R40))

@gustaavik gustaavik merged commit 55cbc8f into main Jul 8, 2025
1 check passed
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.

2 participants