-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (52 loc) · 2.24 KB
/
publish-qldoc.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
name: Publish QLDoc
on:
workflow_dispatch:
inputs:
download_branch:
description: The branch to download the artifacts from
required: true
destination:
description: The path to add the artifact to
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Delete existing docs folder
run: |
rm -r ${{ github.event.inputs.destination }}/codeql-libraries/**;
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.DOWNLOAD_ARTIFACT}}
workflow: __docs-generate-qldoc.yml
branch: '${{ github.event.inputs.download_branch }}'
repo: github/semmle-code
- name: Move artifacts
run: mv artifact/** ${{ github.event.inputs.destination }}/codeql-libraries/ && rm -r artifact
- name: check artifacts
working-directory: ${{ github.event.inputs.destination }}/codeql-libraries
run: ls -la
- name: Unzip artifacts
working-directory: ${{ github.event.inputs.destination }}/codeql-libraries
run: |
unzip pack-cpp-qldoc.zip -d cpp && rm -r pack-cpp-qldoc.zip;
unzip pack-csharp-qldoc.zip -d csharp && rm -r pack-csharp-qldoc.zip;
unzip pack-go-qldoc.zip -d go && rm -r pack-go-qldoc.zip;
unzip pack-java-qldoc.zip -d java && rm -r pack-java-qldoc.zip;
unzip pack-javascript-qldoc.zip -d javascript && rm -r pack-javascript-qldoc.zip;
unzip pack-python-qldoc.zip -d python && rm -r pack-python-qldoc.zip;
rm -r pack-ql-qldoc.zip
- name: Check files
working-directory: ${{ github.event.inputs.destination }}/codeql-libraries
run: ls -la
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: update codeql documentation
title: '[CodeQL standard libraries] Automated PR to update the CodeQL standard libraries (${{ github.event.inputs.download_branch }})'
body: |
PR generated by actions to update the CodeQL standard libraries docs.
Updating from the '${{ github.event.inputs.download_branch }}' branch.
branch: codeql-libraries-update/${{ github.event.inputs.download_branch }}
delete-branch: true