Skip to content

Conversation

@davidaparicio
Copy link

Description

This PR enhances the docker-release workflow to support both prefixed and unprefixed version tags. The workflow now accepts tags in two formats:

  • Standard semantic version: 1.2.3
  • Prefixed version: cloudflare-exporter-1.2.3

When a prefixed tag is used, the prefix is automatically stripped before building the Docker image, ensuring the image is tagged with the clean version number.

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

  • I have run make pr-tests and all tests pass
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Code Quality

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional Notes

Changes made:

  • Updated .github/workflows/docker-release.yaml to accept tags matching pattern cloudflare-exporter-[0-9]+.[0-9]+.[0-9]+
  • Added version extraction step that strips the cloudflare-exporter- prefix if present
  • Applied the extracted version to both the build-and-push and copy-to-dockerhub jobs
  • Backward compatible: existing unprefixed tags (e.g., 1.2.3) continue to work as before

Motivation:

This change provides flexibility in tagging releases, allowing for more descriptive tag names while maintaining clean version numbers in Docker image tags.

@davidaparicio
Copy link
Author

Related with the issue #178 😉

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