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 version checking #498

Closed

Conversation

xHyperElectric
Copy link
Contributor

Context

Fixes #493

To check if the container is up to date on start, and if not link to documentation for how to update the container.

Choices

I created a VERSION file in /scripts and will use a GitHub action to update the version of that file. Then on container start (in start.sh) I query the GitHub API to check if the current version is equal to the tag of the latest version and if not I link to the docusaurus page for updating the container (this page hasn't been added yet)

Test instructions

I shelled into my container and ran the commands inside of it.

Checklist before requesting a review

  • I have performed a self-review/test of my code
  • I've added documentation about this change to the docs.
  • I've not introduced breaking changes.
  • My changes do not violate linting rules.

@xHyperElectric
Copy link
Contributor Author

We need to add an action in workflows to automatically update the VERSION file. The docusaurus page (perhaps: https://palworld-server-docker.loef.dev/guides/updating-container) needs written

@xHyperElectric
Copy link
Contributor Author

xHyperElectric commented Mar 8, 2024

I am not sure how to go about changing the Github workflow file. I'm very new to Github actions. I know that something like:

- name: Update VERSION file
  run: echo "${{ steps.meta.outputs.version }}" > /scripts/VERSION

could update the version file but I don't know how the order of the actions needs to be organized. That action /\ would have to be after the action determining the semvar version, but I wasn't sure if you can modify files after checkout of the repo.

@thijsvanloef
Copy link
Owner

@xHyperElectric I'll have some time to work on this tomorrow, but in the meantime you can take some inspiration from this: https://stackoverflow.com/questions/74694675/adding-a-git-tag-and-version-info-to-docker-image-during-github-actions-build

@xHyperElectric
Copy link
Contributor Author

@thijsvanloef I'm unsure on how to proceed with the github action workflow

@thijsvanloef
Copy link
Owner

@xHyperElectric That is ok, I will take a look at this PR later

@thijsvanloef
Copy link
Owner

Decided to go another way with the version checking #513

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.

Docker release version checker in Image
2 participants