-
-
Notifications
You must be signed in to change notification settings - Fork 511
feat: Add new workflow to update the maintainers servers list #3010
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
base: master
Are you sure you want to change the base?
Conversation
qdm12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks!!! 💯
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "11 3 1 */2 *" # Run at 03:11 on the 1st of every 2nd month |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the comment 😄 !
| - name: Setup Go | ||
| uses: actions/setup-go@v6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit no need for a name
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| - uses: actions/setup-go@v6 |
|
|
||
| - name: Update servers list | ||
| run: | | ||
| go run ./cmd/gluetun/main.go update -all -maintainer -minratio 0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit let's leave the minratio to default for now, we can set it if it becomes problematic.
| go run ./cmd/gluetun/main.go update -all -maintainer -minratio 0.2 | |
| go run ./cmd/gluetun/main.go update -all -maintainer |
|
|
||
| - name: Validate json | ||
| run: | | ||
| cat internal/storage/servers.json | jq -e >/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the defensive programming! But not really needed here; instead we could have unit tests for the updating code logic, but not really necessary at this point. Let's remove 😉
| - name: Validate json | |
| run: | | |
| cat internal/storage/servers.json | jq -e >/dev/null |
| id: createpr | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| branch: bot/update-servers-list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we name that branch with the current date YYYY-MM-DD so it doesn't conflict if one doesn't get merged or isn't deleted?
|
|
||
| - name: Update servers list | ||
| run: | | ||
| go run ./cmd/gluetun/main.go update -all -maintainer -minratio 0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add -proton-email and -proton-password. See
gluetun/.github/workflows/ci.yml
Line 69 in c4f2a22
| verify-private: |
secrets, I'll set secrets.PROTON_EMAIL and secrets.PROTON_PASSWORD for it.
|
|
||
| - name: Merge Pull Request | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr merge ${{ steps.createpr.outputs.pull-request-number }} --auto -m -d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep this commented for now? So we can merge manually a few times, then fully automate
Description
A new workflow has been created that will run the update servers action in maintainer mode, then raise/merge a PR with the changes.
Trivial checks are performed:
The workflow will run once every two months, on the first of the month, at 03:11UTC.
The workflow can also be triggered manually.
You can see some invocations on my fork here: https://github.com/shwoop/gluetun/actions/workflows/update-servers-list.yml
An example merged PR (since reverted): shwoop#16
Issue
#2919
Assertions