generated from a3510377/discord-py-cord-template
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.23 KB
/
contributions.yaml
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
name: Generate contributions
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
deploy:
if: github.repository == 'a3510377/discord-py-cord-template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: pip install requests
- name: Generate contributions
run: python ./.github/contributions.py
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
- name: deploy
run: |
cd .github
git config --global user.name "$user_name"
git config --global user.email "$user_email"
git init
git add -f contributors.svg
git commit -m "${{ github.event.head_commit.message }}"
git push -f https://_:"$token"@github.com/"$repository".git "$ref_name":assets
shell: bash
env:
repository: ${{ github.repository }}
ref_name: master
token: ${{ secrets.GITHUB_TOKEN }}
user_name: GitHub Action
user_email: [email protected]
cname: none