-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
45 lines (40 loc) · 1.17 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
name: "Save Repository Traffic with README Formatting"
description: "Stores repository traffic past two weeks and adds traffic to repository README"
branding:
icon: "archive"
color: "gray-dark"
inputs:
format_readme:
description: "Flag to allow formatting of a template readme with traffic data"
required: false
default: false
type: boolean
commit_msg:
description: "The commit message to use when updating changes to your traffic data"
required: false
default: "Updating repository traffic"
traffic_dir:
description: "The directory to store traffic data in"
required: false
default: ".traffic"
runs:
using: composite
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.10"
- run: pip install github-repo-traffic
shell: bash
- run: repo-data
shell: bash
env:
TRAFFIC_DIR: ${{ inputs.traffic_dir }}
- run: repo-readme
shell: bash
env:
TRAFFIC_DIR: ${{ inputs.traffic_dir }}
if: ${{ inputs.format_readme }}
- uses: EndBug/[email protected]
with:
message: ${{ inputs.commit_msg }}