Skip to content

Replaced 3rd party script with first-party script exposing GH vars #16

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

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

sureshjoshi
Copy link
Member

@sureshjoshi sureshjoshi commented Jun 13, 2024

This PR explicitly exposes the two GH ACTION environment variables we need. This means we pull one less 3rd party dep (in favour of a GH dep), but more importantly, we directly expose the two env vars we need

Assuming Pants users will cargo cult this file, I think being a bit more explicit is nice.

Also updated actions to v9, and formatted with Prettier. Ran actionlint over the code to no complaints.

…variables we require

- Updated actions to v9
- Formatted with Prettier
Copy link
Member Author

Choose a reason for hiding this comment

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

Ensure the diff is "hiding whitespace", otherwise this will be a pain

core.exportVariable("ACTIONS_CACHE_URL", process.env.ACTIONS_CACHE_URL || "");
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN || "");

- uses: pantsbuild/actions/init-pants@v9
Copy link
Member Author

Choose a reason for hiding this comment

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

Change 2: Bumped version

with:
platforms: linux/amd64,linux/arm64

- name: Set up environment variables for Pants (Docker) to use GHA Cache
Copy link
Member Author

Choose a reason for hiding this comment

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

Change 1: Replaced crazy-max with GH script

@sureshjoshi sureshjoshi marked this pull request as ready for review June 13, 2024 02:22
@sureshjoshi sureshjoshi merged commit 1c4bca8 into pantsbuild:main Jun 17, 2024
2 checks passed
@sureshjoshi sureshjoshi deleted the env-vars branch June 17, 2024 20:12
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