File tree Expand file tree Collapse file tree 5 files changed +28
-21
lines changed Expand file tree Collapse file tree 5 files changed +28
-21
lines changed Original file line number Diff line number Diff line change 44 schedule :
55 - cron : ' 30 0 * * *'
66 # - cron: '*/5 * * * *'
7+
78jobs :
89 build :
910 runs-on : ubuntu-latest
1011 name : run
1112 steps :
12- - uses : actions/checkout@v2
13+ - name : Checkout
14+ uses : actions/checkout@v3
1315 with :
1416 ref : ' gh-pages'
1517
16- - name : Golang Action
17- uses :
cedrickring/[email protected] 18-
18+ - name : Setup Golang
19+ uses : actions/setup-go@v4
20+ with :
21+ go-version-file : ' go.mod'
22+
23+ - name : Update redirects
24+ run : make
25+
1926 - name : Commit files
2027 run : |
2128 git config --local user.email "[email protected] " 2229 git config --local user.name "GitHub Action"
2330 git add --update
2431 if ! git diff --quiet HEAD ; then
2532 DATE=$(date "+%Y/%m/%d %H:%M %Z")
26- git commit -m "Updated by GithubActions at ${DATE}"
27- git push
33+ git commit -m "Updated by GithubActions at ${DATE}"
34+ git push
2835 fi
29-
30- # - name: Push changes
31- # uses: ad-m/github-push-action@master
32- # with:
33- # github_token: ${{ secrets.GITHUB_TOKEN }}
34- # branch: 'gh-pages'
Original file line number Diff line number Diff line change 11run :
2- go get -u github.com/koron/go-github
3- go get -u gopkg.in/yaml.v2
42 go run _scripts/vim_jp-redirects-update/main.go
Original file line number Diff line number Diff line change 55### Pre requirements
66
77* of course checkout this [ vim-jp/redirects] [ 1 ] repo
8- * [ go 1.5.3 or above (1.6 is recommended)] [ 2 ]
9- * golang external packages
10-
11- ```
12- $ go get -u github.com/koron/go-github
13- $ go get -u gopkg.in/yaml.v2
14- ```
8+ * [ go 1.16 or above] [ 2 ]
159
1610### Update redirects
1711
Original file line number Diff line number Diff line change 1+ module github.com/vim-jp/redirects
2+
3+ go 1.16
4+
5+ require (
6+ github.com/koron/go-github v0.0.0-20160618135937-92fbbed2e046
7+ gopkg.in/yaml.v2 v2.4.0
8+ )
Original file line number Diff line number Diff line change 1+ github.com/koron/go-github v0.0.0-20160618135937-92fbbed2e046 h1:YjgY0oqB2nqyVckaRdLhOGslSgcsy0+DlSczAZpPPlM =
2+ github.com/koron/go-github v0.0.0-20160618135937-92fbbed2e046 /go.mod h1:14+A+rOS/yG6PtS3DKcRYYM9tP0+zVghPxIzqOYBXks =
3+ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
4+ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
5+ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY =
6+ gopkg.in/yaml.v2 v2.4.0 /go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ =
You can’t perform that action at this time.
0 commit comments