-
-
Notifications
You must be signed in to change notification settings - Fork 558
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
Merged
+46
−0
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9c13fe4
feat: Add new workflow to update the maintainers servers list
shwoop 4e6bc7c
bump checkout action
shwoop 5398b44
Merge branch 'master' into shwoop-update-servers-list
shwoop 232728c
Apply suggestions from code review
shwoop 6f3fbdd
comment out merge pull request step
shwoop 9971b2a
create PR with timestamp in branch
shwoop 80616b0
TOREVERT: run on fork to test
shwoop afc2d3d
lrn2type
shwoop b72a1f8
Revert "TOREVERT: run on fork to test"
shwoop fbd3a02
provide proton credentials to update command
shwoop 0e22349
Merge branch 'master' into shwoop-update-servers-list
shwoop 573ffae
Merge branch 'master' into shwoop-update-servers-list
shwoop 155372d
Merge branch 'master' into shwoop-update-servers-list
shwoop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Update servers list | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "11 3 1 */2 *" # Run at 03:11 on the 1st of every 2nd month | ||
| jobs: | ||
| update-servers-list: | ||
| if: github.repository == 'qdm12/gluetun' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v6 | ||
shwoop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Update servers list | ||
| run: | | ||
| go run ./cmd/gluetun/main.go update -all -maintainer -minratio 0.2 | ||
shwoop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Check for changes | ||
| run: | | ||
| git diff --exit-code internal/storage/servers.json >/dev/null | ||
|
|
||
| - name: Check no other file changes | ||
| run: | | ||
| ! git diff --exit-code ':!internal/storage/servers.json' >/dev/null | ||
|
|
||
| - name: Validate json | ||
| run: | | ||
| cat internal/storage/servers.json | jq -e >/dev/null | ||
shwoop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Create Pull Request | ||
| id: createpr | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| branch: bot/update-servers-list | ||
qdm12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| base: master | ||
| delete-branch: true | ||
|
|
||
| - name: Merge Pull Request | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr merge ${{ steps.createpr.outputs.pull-request-number }} --auto -m -d | ||
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.