Merge branch 'test-cite-workflow' of github.com:jurra/pymurtree into … #11
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: | |
# pull_request: | |
# types: | |
# - closed | |
on: | |
push: | |
branches: [ '*' ] | |
jobs: | |
gen-citation: | |
# if_merged: | |
# if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install cff-from-621 | |
- name: Generate citation based on pyproject.toml | |
run: | | |
cff-from-621 | |
- name: Commit and push changes | |
env: | |
PAT_TOKEN: ${{ secrets.PAT_TOKEN }} | |
run: | | |
git config --local user.email "{{ github.actor }}@users.noreply.github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Auto commit after successful merge" | |
git push | |