From 66c756b7f547cfb23b47864e16d6879bcc4448fb Mon Sep 17 00:00:00 2001 From: James Fletcher <42464962+jf205@users.noreply.github.com> Date: Thu, 10 Dec 2020 09:07:30 +0000 Subject: [PATCH 1/4] Update generate-query-help-docs.yml --- .github/workflows/generate-query-help-docs.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-query-help-docs.yml b/.github/workflows/generate-query-help-docs.yml index 74cb4c6a9e67..9fabfc41a3d9 100644 --- a/.github/workflows/generate-query-help-docs.yml +++ b/.github/workflows/generate-query-help-docs.yml @@ -1,10 +1,13 @@ name: Generate CodeQL query help documentation using Sphinx on: + workflow_dispatch: + inputs: + description: + description: A description of the purpose of this job. For human consumption. + required: false push: branches: - - main - - 'rc/**' - 'lgtm.com' pull_request: paths: From 0640d2834df11980f7d348d70c3ff95b621ff629 Mon Sep 17 00:00:00 2001 From: James Fletcher <42464962+jf205@users.noreply.github.com> Date: Thu, 10 Dec 2020 09:19:44 +0000 Subject: [PATCH 2/4] Update generate-query-help-docs.yml --- .github/workflows/generate-query-help-docs.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate-query-help-docs.yml b/.github/workflows/generate-query-help-docs.yml index 9fabfc41a3d9..2316336369c3 100644 --- a/.github/workflows/generate-query-help-docs.yml +++ b/.github/workflows/generate-query-help-docs.yml @@ -3,9 +3,13 @@ name: Generate CodeQL query help documentation using Sphinx on: workflow_dispatch: inputs: - description: - description: A description of the purpose of this job. For human consumption. - required: false + description: + description: A description of the purpose of this job. For human consumption. + required: false + ref: + description: The branch in github/codeql to checkout when generating query help. + required: false + default: 'lgtm.com' push: branches: - 'lgtm.com' @@ -21,7 +25,8 @@ jobs: - name: Clone github/codeql uses: actions/checkout@v2 with: - path: codeql + path: codeql + ref: '{{ github.event.inputs.ref }}' - name: Clone github/codeql-go uses: actions/checkout@v2 with: From 9c6962ec25bc096b3f457729722b115a010735d3 Mon Sep 17 00:00:00 2001 From: James Fletcher <42464962+jf205@users.noreply.github.com> Date: Thu, 10 Dec 2020 09:39:44 +0000 Subject: [PATCH 3/4] Update generate-query-help-docs.yml --- .github/workflows/generate-query-help-docs.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-query-help-docs.yml b/.github/workflows/generate-query-help-docs.yml index 2316336369c3..962497eab687 100644 --- a/.github/workflows/generate-query-help-docs.yml +++ b/.github/workflows/generate-query-help-docs.yml @@ -22,11 +22,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Clone github/codeql + - if: github.event.inputs.ref + name: Clone github/codeql (user defined ref) + uses: actions/checkout@v2 + with: + path: codeql + ref: ${{ github.event.inputs.ref }} + - if: github.event.inputs.ref == '' + name: Clone github/codeql (default ref) uses: actions/checkout@v2 with: path: codeql - ref: '{{ github.event.inputs.ref }}' - name: Clone github/codeql-go uses: actions/checkout@v2 with: From a5c08023796e195c6dc1dbb5ad62b2dfba17693a Mon Sep 17 00:00:00 2001 From: james Date: Fri, 11 Dec 2020 17:29:22 +0000 Subject: [PATCH 4/4] address review comments --- .github/workflows/generate-query-help-docs.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate-query-help-docs.yml b/.github/workflows/generate-query-help-docs.yml index 962497eab687..031bf97e7287 100644 --- a/.github/workflows/generate-query-help-docs.yml +++ b/.github/workflows/generate-query-help-docs.yml @@ -6,10 +6,6 @@ on: description: description: A description of the purpose of this job. For human consumption. required: false - ref: - description: The branch in github/codeql to checkout when generating query help. - required: false - default: 'lgtm.com' push: branches: - 'lgtm.com' @@ -17,19 +13,12 @@ on: paths: - '.github/workflows/generate-query-help-docs.yml' - 'docs/codeql/query-help/**' - + jobs: build: runs-on: ubuntu-latest steps: - - if: github.event.inputs.ref - name: Clone github/codeql (user defined ref) - uses: actions/checkout@v2 - with: - path: codeql - ref: ${{ github.event.inputs.ref }} - - if: github.event.inputs.ref == '' - name: Clone github/codeql (default ref) + - name: Clone github/codeql uses: actions/checkout@v2 with: path: codeql