-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
61 lines (51 loc) · 1.72 KB
/
action.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'Github Issues Digest'
description: 'Provide a summary of Github issues for a repository'
inputs:
secret:
description: 'PAT or github token to use for authentication. Defaults to GITHUB_TOKEN'
default: ${{ github.token }}
required: false
repo:
description: 'Repository to monitor in the format of owner/repo, defaults to the current repository'
default: ${{ github.repository }}
required: false
save:
description: 'directory to save the digest setting file, defaults to .github/digests'
required: false
default: ".github/digests"
timezone:
description: 'Timezone to use for the digest, defaults to UTC'
required: false
default: "UTC"
branding:
icon: 'align-justify'
color: 'blue'
runs:
using: 'composite'
steps:
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r ${{ github.action_path }}/requirements.txt
shell: bash
- name: Checkout code
uses: actions/[email protected]
- name: Run script
env:
GIT_SECRET: ${{ inputs.secret }}
GIT_REPO: ${{ inputs.repo }}
DIGEST_SAVE_DIR: ${{ inputs.save }}
TIMEZONE: ${{ inputs.timezone }}
run: |
python ${{ github.action_path }}/app.py
shell: bash
- name: Push changes if there are changes to the data file
run: |
git config --local user.email "github-digest-actions[bot]@users.noreply.github.com"
git config --local user.name "github-digest-actions[bot]"
git add --all ${{ inputs.save }}/
git commit --allow-empty -m "Update digest setting"
git diff --quiet HEAD~ HEAD || git push
shell: bash