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

Add proper tags to docker images #25

Merged

Conversation

ChristophB
Copy link
Member

Changes

This pull request will generate additional docker image tags.

There are essentially two scenarios in which an image is created and published:

  1. Pushing a commit to main branch will always add an additional tag containing a hash code.

  2. Pushing a tag to main branch will add the semantic version number as image tag.

Previous image versions are retained.

See docker/metadata-action documentation for more information.

Some Notes

There is currently a check in place that prevents the "Build Docker Image" workflow from running, if there is no successful "tests" workflow (if: ${{ github.event.workflow_run.conclusion == 'success' }}). This will cause the workflow to be started and immediately skipped, rendering the workflow's on.push and on.pull_request conditions useless (see .github/workflows/docker-image.yml).

@ChristophB ChristophB force-pushed the proper-docker-image-versioning branch 4 times, most recently from d19dad9 to d5cd7f4 Compare January 22, 2024 13:15
@ChristophB
Copy link
Member Author

ChristophB commented Jan 22, 2024

I updated the pull request to address the notes mentioned before.

Docker images are built by

  • creating pull requests to main
  • pushing commits to main
  • creating releases
  • manual dispatching

Only in case of releases and manual dispatches, the resulting images are persisted in the GitHub Docker Registry. Images built from releases will have a proper version tag, whereas manual dispatched images have the branch name and SHA as tag.

image

@ChristophB ChristophB force-pushed the proper-docker-image-versioning branch from d5cd7f4 to 3401bf5 Compare January 22, 2024 13:16
@ReneHaensel ReneHaensel merged commit 2f382cc into nfdi4health:main Jan 22, 2024
11 checks passed
@ChristophB ChristophB deleted the proper-docker-image-versioning branch January 22, 2024 14:06
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