Skip to content

Fix: use curl instead of checkout for en-GB.txt#3490

Open
Davis-3450 wants to merge 3 commits into
OpenRCT2:masterfrom
Davis-3450:ci/optimize-checkout
Open

Fix: use curl instead of checkout for en-GB.txt#3490
Davis-3450 wants to merge 3 commits into
OpenRCT2:masterfrom
Davis-3450:ci/optimize-checkout

Conversation

@Davis-3450

Copy link
Copy Markdown
Contributor

Replaces the actions/checkout of the OpenRCT2/OpenRCT2 repo with a direct curl download of en-GB.txt.

  • fetches only the single en-GB.txt file instead of cloning the whole repo.
  • produces the same path the script expects (OpenRCT2/data/language/en-GB.txt) from the same source (develop branch).
  • doesn't touch permissions, triggers, or the rest of the pipeline.

- name: get en-GB.txt (curl)
run: |
mkdir -p OpenRCT2/data/language
curl -sSLf https://raw.githubusercontent.com/OpenRCT2/OpenRCT2/develop/data/language/en-GB.txt -o OpenRCT2/data/language/en-GB.txt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the motivation for not checking out everything so that it can be faster, but I'm not sure using curl is the best option, since we need to work with GH's URL. GitHub actions provides a way to checkout only a given file, so we could instead do:

Suggested change
curl -sSLf https://raw.githubusercontent.com/OpenRCT2/OpenRCT2/develop/data/language/en-GB.txt -o OpenRCT2/data/language/en-GB.txt
- name: Get OpenRCT2 develop (for en-GB.txt)
uses: actions/checkout@v4
with:
repository: OpenRCT2/OpenRCT2
ref: develop
path: OpenRCT2
sparse-checkout: |
data/language/en-GB.txt
sparse-checkout-cone-mode: false

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