mirror of
https://github.com/inventree/inventree-website.git
synced 2025-04-27 21:16:45 +00:00
Fix action ref (#115)
* add debug line * add token * remove old token ref * move permission section * clean inputs
This commit is contained in:
parent
007f04f9e9
commit
311c0904fa
5
.github/collect_plugin.py
vendored
5
.github/collect_plugin.py
vendored
@ -3,11 +3,12 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from urllib.request import urlopen, Request
|
from urllib.request import urlopen, Request
|
||||||
|
|
||||||
inp_project = os.environ.get('PROJECT')
|
inp_project = os.environ.get('PROJECT').strip()
|
||||||
inp_author = os.environ.get('AUTHOR')
|
inp_author = os.environ.get('AUTHOR').strip()
|
||||||
file_name = Path(f'_repo/{inp_project}.md')
|
file_name = Path(f'_repo/{inp_project}.md')
|
||||||
crowdin_projet_id = 452300
|
crowdin_projet_id = 452300
|
||||||
|
|
||||||
|
print(f'Collecting {inp_project} with {inp_author}...')
|
||||||
|
|
||||||
def get_data(url, key=None, default=0, auth=None):
|
def get_data(url, key=None, default=0, auth=None):
|
||||||
"""Fetches data from remote endpoint"""
|
"""Fetches data from remote endpoint"""
|
||||||
|
7
.github/workflows/collect_plugin.yml
vendored
7
.github/workflows/collect_plugin.yml
vendored
@ -13,11 +13,11 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_PAT }}
|
|
||||||
- name: Get Plugin file
|
- name: Get Plugin file
|
||||||
run: python .github/collect_plugin.py
|
run: python .github/collect_plugin.py
|
||||||
env:
|
env:
|
||||||
@ -26,6 +26,7 @@ jobs:
|
|||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4
|
uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: "[REPO] Add plugin ${{ github.event.inputs.project }}"
|
commit-message: "[REPO] Add plugin ${{ github.event.inputs.project }}"
|
||||||
branch: "plugin/${{ github.event.inputs.project }}"
|
branch: "plugin/${{ github.event.inputs.project }}"
|
||||||
title: "[REPO] Add plugin ${{ github.event.inputs.project }}"
|
title: "[REPO] Add plugin ${{ github.event.inputs.project }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user