Fetch latest repos #131
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
name: Fetch latest repos | |
on: | |
schedule: | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
jobs: | |
build: | |
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 }} |