feat: upload map image assets to the wiki#405
Draft
LVL1024 wants to merge 5 commits into
Draft
Conversation
Adds IMAGE_FILE_MAP to pages.py with the three map plot images (golden statues, crate locations, shop locations) and a new _upload_assets() method in upload.py that uploads them to the File: namespace. Skips files that already exist on the wiki to avoid creating unnecessary file revisions.
Adds a CLI argument and environment variable (FORCE_ASSET_UPLOAD) that, when enabled, skips the existence check in _upload_assets() and overwrites the file on the wiki. Useful when map data changes and editors need to refresh the images.
Adds force-asset-upload as a workflow_dispatch input on both deploy.yaml and auto-deploy.yaml, and passes it through as the FORCE_ASSET_UPLOAD environment variable to the bot. When triggered manually, editors can select this option to force re-upload of map images that changed on disk.
github.event.inputs only exists on workflow_dispatch events. When the deploy workflow is invoked via workflow_call (from auto-deploy.yaml), inputs must be read from the inputs context instead. Both ENGLISH_ONLY and FORCE_ASSET_UPLOAD now use an expression that checks the event type to select the correct context. Also adds FORCE_ASSET_UPLOAD to .env.example and the parameter table in README.md.
docker-compose.yml only passes explicitly listed environment variables to the container. Without this entry, FORCE_ASSET_UPLOAD computed in the deploy workflow step would silently fall through to the default (false) inside the container, making the flag non-functional in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uploads the three map plot images (golden statues, crate locations, shop locations) generated by the map parser to the wiki File namespace.
Adds a
--force-asset-uploadflag that can be toggled via workflow dispatch to re-upload existing images when map data changes.Parsed data in deadlock-data PR - Reopen deadbot PR or run deploy workflow for this branch here to reparse the data