Skip to content

Add workflow for Update Gradle Wrapper Action#102

Merged
fdocr merged 1 commit intoforem:masterfrom
gradle-update:master
Nov 10, 2020
Merged

Add workflow for Update Gradle Wrapper Action#102
fdocr merged 1 commit intoforem:masterfrom
gradle-update:master

Conversation

@cristiangreco
Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Refactor
  • Feature (?)
  • Bug Fix
  • Documentation Update

Description

Hey there 👋

would you be willing to use this GitHub Action to automatically keep Gradle Wrapper updated to latest release? I've created the action as part of the DEV Actions Hackathon and submitted in this post: seeing the action being used in DEV app itself would definitely help me spread the word! This is already being used in other projects, for example in Anki!

So what does "Update Gradle Wrapper Action" do? It can be configured to run at scheduled intervals (e.g. daily or weekly) and will check whether the Wrapper script in the repo is up-to-date to the latest Gradle release: in case a new Gradle version is available, it will create a PR to update the Wrapper. And that's it!

Why is that a good thing? Well, first of all it alleviates the chore of manually updating the Wrapper: you got a bot that keeps track of new Gradle releases for you! More importantly, it boosts security around the Wrapper update and usage processes: this actions verifies that the gradle-wrapper.jar file has not been tampered with (uses checksum comparison), and it sets the distributionSha256Sum property so that the new Gradle binary itself will be verified locally upon download.

In this PR I propose adding a new workflow which runs the action every day at midnight (but feel free to adjust the frequency as you prefer). I've verified it works correctly in my fork of the repo, and you can see here how the generated PR looks like.

The action is under active development, you can have a look at the list of inputs currently supported. There's new features coming up soon and if you'd like to request any particular change just let me know!

Hope you can find this useful, would love your feedback! ❤️

Related Tickets & Documents

What gif best describes this PR or how it makes you feel?

a bot

This action keeps Gradle Wrapper up-to-date to the latest release. It
will run every day at midnight (UTC) and create a pull request if a new
Gradle version is available. The updated Wrapper script is validated
(with checksum verification) during the update process, and the Wrapper
is setup so that it will validate the Gradle binary itself on first run
of the new version.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 21, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@fdocr fdocr left a comment

Choose a reason for hiding this comment

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

Thank you @cristiangreco for both participating in the GitHub Actions hackathon and also the contribution here! Sorry for the delayed response to the PR.

It took a bit to understand the approach as I'm not experienced with TS but it looks like a useful tool to automate this process and to help us stay on top of the recent releases of the wrapper. Seems very well executed and the documentation in the repo is great!

Would you mind rebasing/merging the latest from master so it can be merged? Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants