Create sample-pr.yml #1
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: Update Tools | |
on: | |
push | |
jobs: | |
create-sample-pull-request: | |
# if: ${{ github.repository_owner == 'GothenburgBitFactory' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Make a sample pr | |
env: | |
GITHUB_API_KEY: ${{ secrets.SAMPLE_PR_TOKEN }} | |
# run: | | |
# python3 -m venv /tmp/venv | |
# /tmp/venv/bin/pip install --upgrade pip | |
# /tmp/venv/bin/pip install -r bin/requirements.txt | |
# /tmp/venv/bin/python bin/update.py static/tools-data.json | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
delete-branch: true | |
commit-message: Here is a sample commit | |
author: "Commit Bot <[email protected]>" | |
title: Here is a sample commit | |
body: | | |
- Made a sample commit | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
branch: auto-commit | |
- name: Merge Pull Request | |
if: "${{ steps.cpr.outputs.pull-request-number != '' }}" | |
uses: juliangruber/merge-pull-request-action@v1 | |
with: | |
github-token: ${{ secrets.SAMPLE_PR_TOKEN }} | |
number: ${{ steps.cpr.outputs.pull-request-number }} | |
method: merge |