-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (33 loc) · 1 KB
/
run-logic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: py
on:
# workflow_dispatch
pull_request:
types:
- opened
- reopened
- synchronize
permissions:
issues: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository content
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: execute py script
run: |
python .github/workflows/scripts/my_file.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }} # in case of an issue/comment/review, this will no longer be a PR number, but an ID associated with that particular event!
TARGET_BRANCH: ${{ github.head_ref }}
SOURCE_BRANCH: ${{ github.base_ref }}