-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.52 KB
/
weekly-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# =============================================================================
# Weekly Module Update
# =============================================================================
# This workflow runs weekly to update and test the latest `go.mod` version.
#
# If all the tests succeeds to run in all Go versions, it will create a new PR
# of the `go.mod` and `go.sum`.
#
# NOTE:
# You need to set the `PERSONAL_ACCESS_TOKEN` environment variable in the repo's
# [Settings]-[Secrets]-[Actions secrets]
# To generate a new token go to:
# https://github.com/settings/tokens
# * You need add the "repo" scope to the token but no more.
# =============================================================================
name: Weekly Update
on:
workflow_dispatch:
schedule:
# Runs at 19:30 UTC on Sun (JST: AM 04:30 on every Monday)
- cron: '30 19 * * SUN'
jobs:
automated_build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update go.mod and go.sum min Go ver env
run: |
set -eu
docker compose run tidy
- name: Run tests
# Test only with the latest version of Go. Since on PR, the CIs will
# run on all Go versions.
run: |
set -eu
docker compose run latest
- name: Create Pull Request on Change
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}