-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack: Init github action cron for updating issue
- just test if cron got triggered properly, the go code simply echo and exit and does not do anything to issue
- Loading branch information
Showing
7 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
201* | ||
2020 | ||
docs | ||
.github | ||
.jekyll |
This file contains 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,16 @@ | ||
# Workflow for dyweb weekly | ||
|
||
GitHub workflow does the following things | ||
|
||
- create a new issue every week | ||
- close old issues when creating new issues | ||
- generate new weekly markdown file and push to master | ||
- generate new html? (not sure if it is really needed) | ||
|
||
## TODO | ||
|
||
- multiple workflow yaml | ||
|
||
## Reference | ||
|
||
- [cron](https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) |
This file contains 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,16 @@ | ||
# create a new issue every week | ||
# FIXME(at15): it is coded to every 5 minutes to have test if things are working | ||
|
||
on: | ||
schedule: | ||
- cron: '*/5 * * * *' | ||
|
||
job: | ||
create: | ||
runs-on: ubuntu-latest | ||
name: create new weekly issue | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: new issue | ||
uses: ./ # Uses action in the root directory |
This file contains 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,18 @@ | ||
# https://steele.blue/tiny-github-actions/ | ||
FROM dyweb/go-dev:1.13.6 as builder | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
ARG PROJECT_ROOT=/go/src/github.com/dyweb/weekly | ||
|
||
WORKDIR $PROJECT_ROOT | ||
|
||
COPY . $PROJECT_ROOT | ||
RUN cd scripts/weekly && go install . | ||
|
||
FROM ubuntu:18.04 | ||
LABEL maintainer="[email protected]" | ||
WORKDIR /usr/bin | ||
COPY --from=builder /go/bin/weekly . | ||
ENTRYPOINT ["weekly"] | ||
CMD ["help"] |
This file contains 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,8 @@ | ||
name: 'weekly' | ||
description: 'Create new weekly issue, run weekly generator' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
# TODO: allow passing arguments from workflow | ||
args: | ||
- foo |
This file contains 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,3 @@ | ||
module github.com/dyweb/weekly/scripts/weekly | ||
|
||
go 1.13 |
This file contains 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,12 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
) | ||
|
||
// TODO: create github client, port code from https://github.com/dyweb/dy-bot/blob/master/pkg/weekly/worker.go | ||
|
||
func main() { | ||
fmt.Printf("weekly args %v\n", os.Args) | ||
} |