From 7828f6c354919cd7f99e41e5dcc3f25dc70f83c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:38:26 +0000 Subject: [PATCH 01/11] Bump @actions/core from 1.2.4 to 1.2.6 in /script/validate-data Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] --- script/validate-data/package-lock.json | 6 +++--- script/validate-data/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/script/validate-data/package-lock.json b/script/validate-data/package-lock.json index 110d23f..8839d6a 100644 --- a/script/validate-data/package-lock.json +++ b/script/validate-data/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz", - "integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" }, "@types/js-yaml": { "version": "3.12.4", diff --git a/script/validate-data/package.json b/script/validate-data/package.json index a2b867d..e6403ee 100644 --- a/script/validate-data/package.json +++ b/script/validate-data/package.json @@ -14,7 +14,7 @@ "typescript": "^3.9.2" }, "dependencies": { - "@actions/core": "^1.2.4", + "@actions/core": "^1.2.6", "js-yaml": "^3.13.1", "jsonschema": "^1.2.6" } From ca7b1e42d8ade4820c2c94faa383a3b0e6ab22eb Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 1 Oct 2020 15:06:20 -0400 Subject: [PATCH 02/11] Update stale to most recent version --- automation/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/stale.yml b/automation/stale.yml index 3404517..b671fc0 100644 --- a/automation/stale.yml +++ b/automation/stale.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v1 + - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Stale issue message' From fbdaed8a1ce6d81117badbbfe6fb842dded93f07 Mon Sep 17 00:00:00 2001 From: Tang wiki <51043112+abc52090241@users.noreply.github.com> Date: Fri, 23 Oct 2020 05:20:15 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A8=B1=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 331b241..b50625e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 GitHub +Copyright (c) 2020 GitHub Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 33c4d0afcb8b5c43c5bead1cfd2b33d149f65d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Hovm=C3=B6ller?= Date: Tue, 10 Nov 2020 13:57:09 +0100 Subject: [PATCH 04/11] Prepare python-package.yml for python 3.10 Python 3.10 is coming soon, and this will cause problems with the code as currently written. The python versions are written as floats and not strings, which will mean that 3.10 == 3.1, which is going to be very surprising. --- ci/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/python-package.yml b/ci/python-package.yml index c4a1081..ca1713a 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8] + python-version: ['3.5', '3.6', '3.7', '3.8'] steps: - uses: actions/checkout@v2 From 85739b01da473f4e2b77b53ffefd42338e600dff Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Wed, 11 Nov 2020 09:30:58 +0000 Subject: [PATCH 05/11] update terms and guidelines to account for code scanning workflows --- .github/pull_request_template.md | 11 ++++++----- CONTRIBUTING.md | 8 ++++---- LICENSE | 3 ++- README.md | 1 + 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e79272c..67a60a7 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -This repository contains configuration for what users see when they click on the `Actions` tab. +This repository contains configuration for what users see when they click on the `Actions` tab and the setup page for Code Scanning. It is not: * A playground to try out scripts @@ -6,7 +6,7 @@ It is not: --- -**Please note that we are not accepting new starter workflows at this time. Updates to existing starter workflows are fine.** +**Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.** --- @@ -21,16 +21,17 @@ In the workflow and properties files: - [ ] Include comments in the workflow for any parts that are not obvious or could use clarification. - [ ] CI workflows should run on `push` to `branches: [ $default-branch ]` and `pull_request` to `branches: [ $default-branch ]`. - [ ] Packaging workflows should run on `release` with `types: [ created ]`. +- [ ] Code Scanning workflows should run on `push` to `branches: [ $default-branch, $protected-branches ]` and `pull_request` to `branches: [ $default-branch ]`. We also recommend a `schedule` trigger of `cron: $cron-weekly`. Some general notes: - [ ] This workflow must only use actions that are produced by GitHub, [in the `actions` organization](https://github.com/actions), **or** -- [ ] This workflow must only use actions that are produced by the language or ecosystem that the workflow supports. These actions must be [published to the GitHub Marketplace](https://github.com/marketplace?type=actions). Workflows using these actions must reference the action using the full 40 character hash of the action's commit instead of a tag. Additionally, workflows must include the following comment at the top of the workflow file: +- [ ] This workflow must only use actions that are produced by the language or ecosystem that the workflow supports. These actions must be [published to the GitHub Marketplace](https://github.com/marketplace?type=actions). We recommend that these actions be referenced using the full 40 character hash of the action's commit instead of a tag. Additionally, workflows must include the following comment at the top of the workflow file: ``` # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. ``` -- [ ] This workflow must not send data to any 3rd party service except for the purposes of installing dependencies. -- [ ] This workflow must not use a paid service or product. +- [ ] Automation and CI workflows should not send data to any 3rd party service except for the purposes of installing dependencies. +- [ ] Automation and CI workflows cannot be dependent on a paid service or product. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f9d704..c9e8299 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Contributions to this project are [released](https://help.github.com/articles/gi Please note that this project is released with a [Contributor Code of Conduct]( https://github.com/actions/.github/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. -**At this time we are not accepting any new starter workflows** +**At this time we are only accepting new starter workflows for Code Scanning** ### Previous guidelines for new starter workflows. @@ -17,8 +17,8 @@ Before merging a new workflow, the following requirements need to be met: - Should be as simple as is needed for the service. - There are many programming languages and tools out there. Right now we don't have a page that allows for a really large number of workflows, so we do have to be a little choosy about what we accept. Less popular tools or languages might not be accepted. -- Should not send data to any 3rd party service except for the purposes of installing dependencies. -- Cannot use an Action that isn't in the `actions` organization. -- Cannot be to a paid service or product. +- Automation and CI workflows should not send data to any 3rd party service except for the purposes of installing dependencies. +- Automation and CI workflows cannot be dependent on a paid service or product. +- We recommend that Actions outside of the `actions` organization be pinned to a specific SHA. Thank you diff --git a/LICENSE b/LICENSE index 331b241..658b968 100644 --- a/LICENSE +++ b/LICENSE @@ -18,4 +18,5 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. THIS LICENSE DOES NOT GRANT YOU RIGHTS TO USE ANY CONTRIBUTORS' +NAME, LOGO, OR TRADEMARKS. diff --git a/README.md b/README.md index 6025c5c..e276691 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ These are the workflow files for helping people get started with GitHub Actions. **Directory structure:** * [ci](ci): solutions for Continuous Integration * [automation](automation): solutions for automating workflows. +* [code-scanning](code-scanning): starter workflows for [Code Scanning](https://github.com/features/security) * [icons](icons): svg icons for the relevant template Each workflow must be written in YAML and have a `.yml` extension. They also need a corresponding `.properties.json` file that contains extra metadata about the workflow (this is displayed in the GitHub.com UI). From ef7878c3e6b351a5baf052d25ce729e19680902c Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 19 Nov 2020 14:07:15 -0800 Subject: [PATCH 06/11] Add workflow_dispatch trigger to the default empty workflow --- ci/blank.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/blank.yml b/ci/blank.yml index f7816e9..79ba948 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -2,14 +2,17 @@ name: CI -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the $default-branch branch +# Controls when the action will run. on: + # Triggers the workflow on push or pull request events but only for the $default-branch branch push: branches: [ $default-branch ] pull_request: branches: [ $default-branch ] + # This allows you to run this workflow manually from the Actions tab + workflow_dispatch: + # 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" From bfb45aec418510a5b68ad15395694db7907eca58 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 19 Nov 2020 14:21:12 -0800 Subject: [PATCH 07/11] Shorten the description --- ci/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/blank.yml b/ci/blank.yml index 79ba948..3214287 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -10,7 +10,7 @@ on: pull_request: branches: [ $default-branch ] - # This allows you to run this workflow manually from the Actions tab + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel From 0e2cd77dc8a2aa3769619b37929a26765894e87a Mon Sep 17 00:00:00 2001 From: Robert Rosca <32569096+RobertRosca@users.noreply.github.com> Date: Mon, 23 Nov 2020 11:13:06 +0100 Subject: [PATCH 08/11] Use consistent calls to pip `pip` was called in two different ways which is a bit inconsistent, this change just makes it so that it is called in the same way both times. --- ci/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/python-package.yml b/ci/python-package.yml index c4a1081..403cecd 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + python -m pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | From 64f653a8091f84182b1aa45ce63b0caaddfb94cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=A4bler?= Date: Tue, 24 Nov 2020 21:16:36 +0100 Subject: [PATCH 09/11] Build/Test all go packages Use the "..." pattern to build/test all go packages in a repository. --- ci/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/go.yml b/ci/go.yml index 5531663..16bff70 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -30,7 +30,7 @@ jobs: fi - name: Build - run: go build -v . + run: go build -v ./... - name: Test - run: go test -v . + run: go test -v ./... From bb39041a6050fc10291f4cb8ee1b9e219e06c162 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Tue, 24 Nov 2020 13:52:32 -0800 Subject: [PATCH 10/11] Create stale.yml --- .github/workflows/stale.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..dc4882c --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,20 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "21 4 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has become stale and will be closed automatically within a period of time. Sorry about that.' + stale-pr-message: 'This pull request has become stale and will be closed automatically within a period of time. Sorry about that.' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + days-before-stale: 90 From d41b5571e7a9a718ca15705a8e5c2067082ec91b Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Tue, 24 Nov 2020 14:43:12 -0800 Subject: [PATCH 11/11] Add in codeowners for this repo --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..5c6704e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @actions-experience @advanced-security-code-scanning