-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 877 Bytes
/
cron.yaml
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
name: Fetch latest repos
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.19.1
- run: go run main.go --update
- name: Create file name
run: echo "::set-output name=json::`date +%Y-%m-%d`.json"
id: filename
- name: Create tag name
run: echo "::set-output name=date::`date +%Y.%m.%d`"
id: tagname
- name: Create Release
uses: ncipollo/[email protected]
with:
artifacts: github_repos.json
name: ${{ steps.filename.outputs.json }}
tag: ${{ steps.tagname.outputs.date }}