release report #203
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: release report | |
on: | |
schedule: | |
# run at 2:05am on Saturdays | |
- cron: '5 2 * * SAT' | |
env: | |
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }} | |
GITHUB_API_TOKEN: ${{ secrets.GH_API_TOKEN }} | |
jobs: | |
generate-iteration-report: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
ref: ${{ github.head_ref }} | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Retrive releases and update release data file | |
run: python .github/releases.py | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v4 | |
with: | |
author_name: GitHub Action | |
author_email: action@github.com | |
message: "Update release data from GitHub Actions" | |
add: "data/*" # could just do data/releases.json | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push changes | |
uses: ad-m/github-push-action@v0.6.0 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
github_token: ${{ secrets.GH_API_TOKEN }} | |
branch: ${{ github.ref }} | |