Generate Securities List #138
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
name: Generate Securities List | |
jobs: | |
generate-securities-list: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.x | |
- name: Generate securities list | |
run: go run ./scripts/generate_securities.go && go fmt ./twstock/securities_GENERATED.go | |
- name: Check securities list changed | |
id: check_list_changed | |
shell: bash | |
run: git diff --exit-code ./twstock/securities_GENERATED.go || echo "changed=1" >> $GITHUB_OUTPUT | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
if: steps.check_list_changed.outputs.changed == 1 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Create Pull Request | |
id: cpr | |
if: steps.check_list_changed.outputs.changed == 1 | |
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f #v7.0.6 | |
with: | |
token: ${{ secrets.PAT }} | |
committer: renovate[bot] <[email protected]> | |
author: renovate[bot] <[email protected]> | |
commit-message: "[Scheduled] Update securities list" | |
title: "[Scheduled] Update securities list" | |
body: | | |
Auto-generated by [create-pull-request][1] | |
--- | |
[1]: https://github.com/peter-evans/create-pull-request | |
branch: cron-generate-securities-list | |
delete-branch: true | |
labels: GitHub Actions | |
assignees: miles170 |