Skip to content

CI: implement best practices and update actions#100

Merged
black-sliver merged 4 commits intoArchipelagoMW:mainfrom
black-sliver:ci/best-practices
Apr 15, 2026
Merged

CI: implement best practices and update actions#100
black-sliver merged 4 commits intoArchipelagoMW:mainfrom
black-sliver:ci/best-practices

Conversation

@black-sliver
Copy link
Copy Markdown
Member

@black-sliver black-sliver commented Apr 15, 2026

  • use cooldown in dependabot config:
    • this delays opening non-security PRs by 3 days, hopefully skipping any bad updates
    • Actions currently do not support cooldown, but hopefully this will be added in the future.
  • put permissions: everywhere with the minimal set of actually required permissions:
    • secrets should always be available, I think (if not we'll only see this after merging)
    • checkout and upload-artifact work with empty permissions on public repos
    • required permissions for dependency graph are copied from action documentation
  • disable cache for release build - this makes it impossible to poison the cache of release builds
  • update actions to latest and pin them
    • the changes look compatible
    • actions/* still use the discontinued preview of immutable actions. If immutable actions ever get completely removed, I hope actions/* will move to immutable releases (to make tags immutable)
    • the gradle/* is third party, so we pin by hash

We should probably make the maven signing/publish conditional at some point so forks can build in CI.

if supported; 3 days is hopefully good enough to catch bad stuff.

Actions currently do not support cooldown, but hopefully this will
be added in the future.
actions/* are pinned to version. Those should use immutable actions preview.
gradle/* is pinned by commit hash.
cache: gradle
- name: Submit Dependency Snapshot
uses: gradle/actions/dependency-submission@v4
uses: gradle/actions/dependency-submission@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By my reading, this looks to have been superceded twice. Firstly, in favor of https://github.com/gradle/gradle-build-action?tab=readme-ov-file#github-dependency-graph-support, and then that was replaced in favor of https://github.com/gradle/actions/blob/main/docs/setup-gradle.md.

Dunno that we need to change it right away, but eventually I guess.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think setup-gradle replaces setup-java (and also implements submitting the dependency graph), but gradle/actions/dependency-submission seems to still be maintained.
We could switch in the future, but I am not sure if setup-gradle has any real advantage over what we are doing now.

@black-sliver black-sliver merged commit b100154 into ArchipelagoMW:main Apr 15, 2026
1 check passed
@black-sliver black-sliver deleted the ci/best-practices branch April 15, 2026 07: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