forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 2.43 KB
/
Copy pathdemo.yml
File metadata and controls
73 lines (60 loc) · 2.43 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
# This is a basic workflow to help you get started with Actions
name: demo
on:
issues:
types:
- reopened
- opened
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions: write-all
defaults:
run:
shell: bash # Specify the shell you want to use (e.g., bash, pwsh, sh, etc.)
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: pacoxu/actions-comment-on-issue@1.0.3
name : Bot Init
with:
message: "AI bot is preparing code suggestions."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Powershell repo
uses: actions/checkout@v2
- name: Get directory
run: ls
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r .github/workflows/script/requirements.txt
- name: execute py script # run file
run: |
python ./.github/workflows/script/test.py
- uses: pacoxu/actions-comment-on-issue@1.0.3
name: Create Code Suggestions PR
with:
message: "Here are the suggested code change: Edit the testfile.js"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Branch
# You may pin to the exact commit or the version.
# uses: peterjgrainger/action-create-branch@b48b0ca0e307c9b56f059b70274984ffeaa90a43
uses: peterjgrainger/action-create-branch@v2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# The branch to create
branch: issuebranch
- name: create pull request
run: |
gh pr create -R ${{ github.event.issue.user.login }}/azure-powershell -H issuebranch --title 'test PR' --body 'resolves https://github.com/${{ github.event.issue.user.login }}/azure-powershell/issues/${{ github.event.issue.number }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ENTERPRISE_TOKEN: ${{ secrets.GITHUB_TOKEN }}