mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-07 16:33:40 +00:00
Fix workflow (#3293)
* fix typo in README.md fixes #3204 * test * Delete main.yml * fix workflow * set to run on original repository
This commit is contained in:
parent
e6b6f86810
commit
ca3d6d7366
4
.github/workflows/run-check.yaml
vendored
4
.github/workflows/run-check.yaml
vendored
@ -1,5 +1,6 @@
|
|||||||
name: Check For Stale Repositories
|
name: Check For Stale Repositories
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * 0'
|
- cron: '0 0 * * 0'
|
||||||
jobs:
|
jobs:
|
||||||
@ -10,10 +11,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
go: ['1.15.x']
|
go: ['1.15.x']
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@1.0.0
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: |
|
||||||
go get -v -t -d ./...
|
go get -v -t -d ./...
|
||||||
- name: run script
|
- name: run script
|
||||||
run: go run test_stale_repositories.go scripts.go
|
run: go run test_stale_repositories.go scripts.go
|
||||||
env:
|
env:
|
||||||
GITHUB_OAUTH_TOKEN: ${{secrets.OAUTH_TOKEN}}
|
OAUTH_TOKEN: ${{secrets.OAUTH_TOKEN}}
|
@ -224,7 +224,7 @@ func testStaleRepository() {
|
|||||||
query := startQuery()
|
query := startQuery()
|
||||||
var staleRepos []string
|
var staleRepos []string
|
||||||
addressedRepositories := make(map[string]bool)
|
addressedRepositories := make(map[string]bool)
|
||||||
oauth := os.Getenv("GITHUB_OAUTH_TOKEN")
|
oauth := os.Getenv("OAUTH_TOKEN")
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
if oauth == "" {
|
if oauth == "" {
|
||||||
log.Print("No oauth token found. Using unauthenticated client ...")
|
log.Print("No oauth token found. Using unauthenticated client ...")
|
||||||
@ -271,11 +271,5 @@ func testStaleRepository() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
f, err := os.OpenFile("test_stale_repositories_log", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
|
|
||||||
if err != nil {
|
|
||||||
log.Println("FAILED TO INIT LOG FILE")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
log.SetOutput(f)
|
|
||||||
testStaleRepository()
|
testStaleRepository()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user