-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (34 loc) · 1.2 KB
/
on-new-issue.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
41
name: send-issue-smartsheet
run-name: ${{ github.actor }} created an issue
on:
issues:
types: [opened] # TODO: Create on: issues: [edited] to connect to Smartsheet PUT request to update issues when edited
env:
SMART_ACCESS_TOKEN: ${{ secrets.SMARTSHEET_ACCESS_TOKEN }}
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
ISSUE_NUM: ${{ vars.ISSUE_NUM }}
jobs:
fetch-and-store:
runs-on: ubuntu-latest
steps:
- name: Increment
id: increment_issue_num
uses: action-pack/increment@v2
with:
name: 'ISSUE_NUM'
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Checkout # checks out repository
uses: actions/checkout@v4
- name: Set up Python # sets up python for runner to prepare for script
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
pip install smartsheet-python-sdk
pip install python-dotenv
- name: Fetch Data and Write to Sheet # runs script that makes API call and writes to a Smartsheet
run: |
python post-issue-smartsheet.py