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

fix docker image tagging #46

Merged
merged 1 commit into from Jun 9, 2022
Merged

fix docker image tagging #46

merged 1 commit into from Jun 9, 2022

Conversation

artivis
Copy link
Contributor

@artivis artivis commented Jun 8, 2022

Summary

Fix the docker image tagging in CI.

Details

Currently wikmd is not following the semver standard for git tags. This causes the metadata-action to silently fail and an empty docker tag is generated. This empty tag is passed on all the way down to docker run which then fails.

With this change, the CI will create docker tags base on,

  • pr number e.g. linbreux/wikmd:pr-5
  • git tag e.g. linbreux/wikmd:v1.6
  • main branch -> linbreux/wikmd:edge

Checks

  • In case of new feature, add short overview in docs/<corresponding file>
  • Tested changes

@artivis artivis marked this pull request as ready for review June 8, 2022 17:09
@Linbreux Linbreux merged commit b652617 into Linbreux:main Jun 9, 2022
@Linbreux
Copy link
Owner

Linbreux commented Jun 9, 2022

Thanks for solving this!

@Linbreux
Copy link
Owner

Linbreux commented Jun 9, 2022

I got an error while testing tags:

Run docker run -d --name wikmd -p 5000:5000 linbreux/wikmd:v1.6.1
  docker run -d --name wikmd -p 5000:5000 linbreux/wikmd:v1.6.1
  linbreux/wikmd:latest
  shell: /usr/bin/bash -e {0}
73d[2](https://github.com/Linbreux/wikmd/runs/6808444904?check_suite_focus=true#step:6:2)cd70ee877fa0[3](https://github.com/Linbreux/wikmd/runs/6808444904?check_suite_focus=true#step:6:3)8b6e877c2759d2eadb68d7ebe06225a0e66a2af9b7ca190
/home/runner/work/_temp/b40e9331-9d6d-464d-bf04-42381bbc0b10.sh: line 2: linbreux/wikmd:latest: No such file or directory
Error: Process completed with exit code 12[7](https://github.com/Linbreux/wikmd/runs/6808444904?check_suite_focus=true#step:6:8).

It seem to be a problem with linbreux/wikmd:latest. Building and testing the main branch works perfect.

@artivis
Copy link
Contributor Author

artivis commented Jun 9, 2022

Hey, sorry about that. It seems that the needs.build.outputs.wikmd_tag contains both tags and that doesn't play well with docker run of course. Not sure how to fix that but I'll try to give it a look 👍

@crazy-max
Copy link

@artivis Use ${{ steps.meta.outputs.version }} instead of ${{ steps.meta.outputs.tags }}

@artivis
Copy link
Contributor Author

artivis commented Jun 16, 2022

@artivis Use ${{ steps.meta.outputs.version }} instead of ${{ steps.meta.outputs.tags }}

Hey, the issue has been solved in #47.

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.

None yet

3 participants