Skip to content

Conversation

@shwoop
Copy link
Contributor

@shwoop shwoop commented Nov 24, 2025

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 static servers list file has been altered
  • no other files have been altered
  • the static servers list file is valid json

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

  • I am aware that we do not accept manual changes to the servers.json file
  • I am aware that any changes to settings should be reflected in the wiki

@shwoop shwoop marked this pull request as ready for review November 24, 2025 14:55
Copy link
Owner

@qdm12 qdm12 left a 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
Copy link
Owner

Choose a reason for hiding this comment

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

I appreciate the comment 😄 !

Comment on lines +17 to +18
- name: Setup Go
uses: actions/setup-go@v6
Copy link
Owner

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

Suggested change
- 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
Copy link
Owner

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.

Suggested change
go run ./cmd/gluetun/main.go update -all -maintainer -minratio 0.2
go run ./cmd/gluetun/main.go update -all -maintainer

Comment on lines +33 to +36

- name: Validate json
run: |
cat internal/storage/servers.json | jq -e >/dev/null
Copy link
Owner

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 😉

Suggested change
- 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
Copy link
Owner

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
Copy link
Owner

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

verify-private:
on how to use secrets, I'll set secrets.PROTON_EMAIL and secrets.PROTON_PASSWORD for it.

Comment on lines +45 to +50

- name: Merge Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge ${{ steps.createpr.outputs.pull-request-number }} --auto -m -d
Copy link
Owner

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

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