Bookmarks #63
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: Bookmarks | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: bookmarks | |
env: | |
CI_COMMIT_MESSAGE: Update bookmarks | |
CI_COMMIT_AUTHOR: Continuous Integration | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# Update the bookmark | |
- name: Update Bookmarks | |
env: | |
HRSS_BASE_URL: ${{ secrets.HRSS_BASE_URL }} | |
HRSS_RSS_FEED_TAG_PREFIX: ${{ secrets.HRSS_RSS_FEED_TAG_PREFIX }} | |
HRSS_HOARDER_API_TOKEN: ${{ secrets.HRSS_HOARDER_API_TOKEN }} | |
run: | | |
pip install requests | |
python scripts/bookmarks.py | |
# Commit and push all changed files. | |
- name: Commit Push | |
run: | | |
set -e | |
git config --global init.defaultBranch main | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "username@users.noreply.github.com" | |
git add -A | |
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" ||: | |
git push |