Skip to content

Commit cef9410

Browse files
committed
Refresh update workflow
1 parent 714c479 commit cef9410

File tree

5 files changed

+28
-21
lines changed

5 files changed

+28
-21
lines changed

.github/workflows/main.yml

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,32 @@ on:
44
schedule:
55
- cron: '30 0 * * *'
66
# - cron: '*/5 * * * *'
7+
78
jobs:
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'

Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
run:
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

README.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
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

go.mod

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
)

go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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=

0 commit comments

Comments
 (0)