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/44] 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/44] 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/44] =?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 fecbb32bb8564fa1ef4b16ca5edb9e28b2793e17 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Tue, 27 Oct 2020 15:44:22 -0700 Subject: [PATCH 04/44] Rename label-close.yml to label-support.yml --- .github/workflows/{label-close.yml => label-support.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{label-close.yml => label-support.yml} (100%) diff --git a/.github/workflows/label-close.yml b/.github/workflows/label-support.yml similarity index 100% rename from .github/workflows/label-close.yml rename to .github/workflows/label-support.yml From d7ac62140faf23b67c29e892d4ce68342eb09609 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Tue, 27 Oct 2020 15:47:43 -0700 Subject: [PATCH 05/44] Create label-feature.yml --- .github/workflows/label-feature.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/label-feature.yml diff --git a/.github/workflows/label-feature.yml b/.github/workflows/label-feature.yml new file mode 100644 index 0000000..96ac8c1 --- /dev/null +++ b/.github/workflows/label-feature.yml @@ -0,0 +1,19 @@ +name: Close as a feature +on: + issues: + types: [labeled] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Close Issue + uses: peter-evans/close-issue@v1 + if: contains(github.event.issue.labels.*.name, 'feature') + with: + comment: | + Thank you 🙇 for this request. This request has been classified as a feature by the maintainers. + + We take all the requests for features seriously and have passed this on to the internal teams for their consideration. + + Because any feature requires further maintenance and support in the long term by this team, we would like to exercise caution into adding new features. If this feature is something that can be implemented independently, please consider forking this repository and adding the feature. From f938476d14e4e0b67d0ef855443ef90760d2739b Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 30 Oct 2020 12:46:33 -0700 Subject: [PATCH 06/44] Update dart.yml --- ci/dart.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/ci/dart.yml b/ci/dart.yml index 6e1b2e3..a009d1d 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -1,4 +1,4 @@ -name: Dart CI +name: Dart on: push: @@ -8,15 +8,30 @@ on: jobs: build: - runs-on: ubuntu-latest + # Note that this workflow uses the latest stable version of the Dart SDK. + # Docker images for other release channels - like dev and beta - are also + # available. See https://hub.docker.com/r/google/dart/ for the available + # images. container: image: google/dart:latest steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: pub get - - name: Run tests - run: pub run test + - uses: actions/checkout@v2 + + - name: Install package dependencies + run: pub get + + # Comment this step in to verify the use of 'dart format' on each commit. + # - name: Check formatting + # run: dart format --output=none --set-exit-if-changed . + + - name: Analyze code + run: dart analyze + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + - name: Run tests + run: dart test From 17e1df2111a39afa88818422bfcf7679fd7d5c14 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 2 Nov 2020 09:07:53 -0800 Subject: [PATCH 07/44] Update dart.yml Review comments from @mit-mit. --- ci/dart.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ci/dart.yml b/ci/dart.yml index a009d1d..d3ad4f8 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -20,18 +20,22 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install package dependencies - run: pub get + - name: dart --version + run: dart --version - # Comment this step in to verify the use of 'dart format' on each commit. - # - name: Check formatting + - name: dart pub get + run: dart pub get + + # Uncomment this step to verify the use of 'dart format' on each commit. + # - name: dart format # run: dart format --output=none --set-exit-if-changed . - - name: Analyze code + # Consider passing '--fatal-infos' for slightly stricter analysis. + - name: dart analyze run: dart analyze # Your project will need to have tests in test/ and a dependency on # package:test for this step to succeed. Note that Flutter projects will # want to change this to 'flutter test'. - - name: Run tests + - name: dart test run: dart test From e2510e2a621b7406de1d343fcb3efeb4ed48e579 Mon Sep 17 00:00:00 2001 From: Usha N Date: Tue, 3 Nov 2020 18:21:34 +0530 Subject: [PATCH 08/44] Updating the pre-req configuration steps For Linux Apps, Developers need to set a new app setting called WEBSITE_WEBDEPLOY_USE_SCM and set to `true` before downloading the publish profile. --- ci/azure.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/azure.yml b/ci/azure.yml index a638c4c..2678376 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -5,10 +5,13 @@ # # To configure this workflow: # -# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. +# 1. For Linux apps, add an app setting called WEBSITE_WEBDEPLOY_USE_SCM and set it to true in your app. +# For more instructions see: +# +# 2. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. # For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret # -# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). +# 3. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). # # For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions # For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples From dfaa4e420b04976270ea2f53f4de37f47aca6175 Mon Sep 17 00:00:00 2001 From: Nemo Xiong Date: Thu, 5 Nov 2020 01:57:31 +0800 Subject: [PATCH 09/44] remove misleading info python-django.* has renamed to django.*, while the doc remains the same --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdd9bf8..6025c5c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ These are the workflow files for helping people get started with GitHub Actions. 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). -For example: `ci/python-django.yml` and `ci/properties/python-django.properties.json`. +For example: `ci/django.yml` and `ci/properties/django.properties.json`. **Valid properties:** * `name`: the name shown in onboarding From f75012de65c4d2e22b548521929b053e5c929737 Mon Sep 17 00:00:00 2001 From: Kayla Ngan Date: Wed, 4 Nov 2020 16:32:58 -0500 Subject: [PATCH 10/44] Revert "Update Publish Docker template to publish to GitHub Container Registry" --- ci/docker-publish.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index fc5439b..76756db 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -50,13 +50,12 @@ jobs: - name: Build image run: docker build . --file Dockerfile --tag $IMAGE_NAME - - name: Log into GitHub Container Registry - # TODO: Create a PAT with `read:packages` and `write:packages` scopes and save it as an Actions secret `CR_PAT` - run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin + - name: Log into registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin - - name: Push image to GitHub Container Registry + - name: Push image run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME # Change all uppercase to lowercase IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') From 5aeeb19100f15129efbaa9025bcffcbd1a674e71 Mon Sep 17 00:00:00 2001 From: Usha N Date: Thu, 5 Nov 2020 22:32:30 +0530 Subject: [PATCH 11/44] Update azure.yml --- ci/azure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure.yml b/ci/azure.yml index 2678376..5842381 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -5,8 +5,8 @@ # # To configure this workflow: # -# 1. For Linux apps, add an app setting called WEBSITE_WEBDEPLOY_USE_SCM and set it to true in your app. -# For more instructions see: +# 1. For Linux apps, add an app setting called WEBSITE_WEBDEPLOY_USE_SCM and set it to true in your app **before downloading the file**. +# For more instructions see: https://docs.microsoft.com/azure/app-service/configure-common#configure-app-settings # # 2. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. # For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret From 33e4b7e557c644fcc918d862907b5753f4d55152 Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Mon, 9 Nov 2020 10:09:50 +0000 Subject: [PATCH 12/44] add codeql workflow --- code-scanning/codeql.yml | 67 +++++++++++++++++++ .../properties/codeql.properties.json | 7 ++ 2 files changed, 74 insertions(+) create mode 100644 code-scanning/codeql.yml create mode 100644 code-scanning/properties/codeql.properties.json diff --git a/code-scanning/codeql.yml b/code-scanning/codeql.yml new file mode 100644 index 0000000..09d68ef --- /dev/null +++ b/code-scanning/codeql.yml @@ -0,0 +1,67 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ $default-branch, $protected-branches ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ $default-branch ] + schedule: + - cron: $cron-weekly + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ $detected-codeql-languages ] + # CodeQL supports [ $supported-codeql-languages ] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/code-scanning/properties/codeql.properties.json b/code-scanning/properties/codeql.properties.json new file mode 100644 index 0000000..cb9305a --- /dev/null +++ b/code-scanning/properties/codeql.properties.json @@ -0,0 +1,7 @@ +{ + "name": "CodeQL Analysis", + "creator": "GitHub", + "description": "Security analysis from GitHub for C, C++, C#, Java, JavaScript, TypeScript, Python, and Go developers.", + "iconName": "octicon mark-github", + "categories": ["Code Scanning", "C", "C#", "C++", "Go", "Java", "JavaScript", "TypeScript", "Python"] +} From 1e97b0eba71cf363b419bc663212c01e163359e6 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 9 Nov 2020 09:54:52 -0800 Subject: [PATCH 13/44] Update dart.yml Change to sentence fragment case for the step names --- ci/dart.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/dart.yml b/ci/dart.yml index d3ad4f8..138921f 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -20,22 +20,22 @@ jobs: steps: - uses: actions/checkout@v2 - - name: dart --version + - name: Print Dart SDK version run: dart --version - - name: dart pub get + - name: Install dependencies run: dart pub get # Uncomment this step to verify the use of 'dart format' on each commit. - # - name: dart format + # - name: Verify formatting # run: dart format --output=none --set-exit-if-changed . # Consider passing '--fatal-infos' for slightly stricter analysis. - - name: dart analyze + - name: Analyze project source run: dart analyze # Your project will need to have tests in test/ and a dependency on # package:test for this step to succeed. Note that Flutter projects will # want to change this to 'flutter test'. - - name: dart test + - name: Run tests run: dart test 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 14/44] 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 15/44] 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 500534878c28b83304ed572c7e9df8efa9ce86d8 Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Thu, 12 Nov 2020 12:42:47 +0000 Subject: [PATCH 16/44] update doc link in codeql template --- code-scanning/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code-scanning/codeql.yml b/code-scanning/codeql.yml index 09d68ef..3e8f951 100644 --- a/code-scanning/codeql.yml +++ b/code-scanning/codeql.yml @@ -30,8 +30,8 @@ jobs: matrix: language: [ $detected-codeql-languages ] # CodeQL supports [ $supported-codeql-languages ] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + # Learn more: + # https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository From 44c50acb70a47e6f3179276ba7ff9b7154a015cf Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Fri, 13 Nov 2020 16:33:01 +0000 Subject: [PATCH 17/44] amend link in codeql workflow --- code-scanning/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/codeql.yml b/code-scanning/codeql.yml index 3e8f951..d88fe52 100644 --- a/code-scanning/codeql.yml +++ b/code-scanning/codeql.yml @@ -31,7 +31,7 @@ jobs: language: [ $detected-codeql-languages ] # CodeQL supports [ $supported-codeql-languages ] # Learn more: - # https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository From 92d9a2c433f151f38f772748f00edc1c037ec92d Mon Sep 17 00:00:00 2001 From: Ben McMorran Date: Fri, 13 Nov 2020 13:51:08 -0800 Subject: [PATCH 18/44] Add MSBuild C/C++ starter workflow --- ci/msbuild.yml | 32 +++++++++++++++++++++++++++ ci/properties/msbuild.properties.json | 6 +++++ 2 files changed, 38 insertions(+) create mode 100644 ci/msbuild.yml create mode 100644 ci/properties/msbuild.properties.json diff --git a/ci/msbuild.yml b/ci/msbuild.yml new file mode 100644 index 0000000..4a5d309 --- /dev/null +++ b/ci/msbuild.yml @@ -0,0 +1,32 @@ +name: MSBuild + +on: [push] + +env: + # Path to the solution file relative to the root of the project. + SOLUTION_FILE_PATH: . + + # Configuration type to build. + # You can convert this to a build matrix if you need coverage of multiple configuration types. + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + BUILD_CONFIGURATION: Release + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1 + + - name: Restore NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.SOLUTION_FILE_PATH}} + + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + # Add additional options to the MSBuild command line here (like platform or verbosity level). + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} diff --git a/ci/properties/msbuild.properties.json b/ci/properties/msbuild.properties.json new file mode 100644 index 0000000..b90cad8 --- /dev/null +++ b/ci/properties/msbuild.properties.json @@ -0,0 +1,6 @@ +{ + "name": "MSBuild based projects", + "description": "Build a MSBuild based project.", + "iconName": "c-cpp", + "categories": ["C", "C++"] +} \ No newline at end of file From ef7878c3e6b351a5baf052d25ce729e19680902c Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 19 Nov 2020 14:07:15 -0800 Subject: [PATCH 19/44] 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 20/44] 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 21/44] 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 22/44] 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 23/44] 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 24/44] 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 From 6a074bcdf6f6d5eb2301db8984f18a46c10a193a Mon Sep 17 00:00:00 2001 From: Tim Etchells Date: Mon, 30 Nov 2020 11:15:59 -0500 Subject: [PATCH 25/44] Update OpenShift starter with new actions Signed-off-by: Tim Etchells --- ci/openshift.yml | 179 ++++++++++++++++++------ ci/properties/openshift.properties.json | 4 +- 2 files changed, 141 insertions(+), 42 deletions(-) diff --git a/ci/openshift.yml b/ci/openshift.yml index 978d3a1..23fffaf 100644 --- a/ci/openshift.yml +++ b/ci/openshift.yml @@ -1,48 +1,147 @@ -# This workflow will set up the oc CLI in your GitHub Action workflow and deploy your application to your OpenShift cluster. -# -# This workflow assumes you already have access to an OpenShift cluster. -# For instructions to get started with OpenShift see https://www.openshift.com/try -# -# To configure this workflow: -# -# 1. Set up a secret in your repository named OPENSHIFT_SERVER_URL with the value of your OpenShift server URL. -# -# 2. Set up another secret named API_TOKEN with the value of a valid token to authenticate to OpenShift. -# -# 3. Change the values for the PROJECT and APP_NAME environment variables (below). -# -# For more information on the OpenShift Action, refer to https://github.com/redhat-developer/openshift-actions -name: Build and Deploy to OpenShift -on: - push: - branches: - - $default-branch +### The OpenShift Starter workflow will: +# - Checkout your repository +# - Perform a Docker build +# - Push the built image to an image registry +# - Log in to your OpenShift cluster +# - Create an OpenShift app from the image and expose it to the internet. -# Environment variables available to all jobs and steps in this workflow +### Before you begin: +# - Have write access to a container image registry such as quay.io or Dockerhub. +# - Have access to an OpenShift cluster. +# - For instructions to get started with OpenShift see https://www.openshift.com/try +# - The project you wish to add this workflow to should have a Dockerfile. +# - If you don't have a Dockerfile at the repository root, see the buildah-build step. +# - Builds from scratch are also available, but require more configuration. + +### To get the workflow running: +# 1. Add this workflow to your repository. +# 2. Edit the top-level 'env' section, which contains a list of environment variables that must be configured. +# 3. Create the secrets referenced in the 'env' section under your repository Settings. +# 4. Edit the 'branches' in the 'on' section to trigger the workflow on a push to your branch. +# 5. Commit and push your changes. + +# For a more sophisticated example, see https://github.com/redhat-actions/spring-petclinic/blob/main/.github/workflows/petclinic-sample.yaml +# Also see our GitHub organization, https://github.com/redhat-actions/ + +name: OpenShift + +# ⬇️ Modify the fields marked with ⬇️ to fit your project, and create any secrets that are referenced. +# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets env: - PROJECT: myproject - APP_NAME: myapp + # ⬇️ EDIT with your registry and registry path. + REGISTRY: quay.io/ + # ⬇️ EDIT with your registry username. + REGISTRY_USER: + REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} + + # ⬇️ EDIT to log into your OpenShift cluster and set up the context. + # See https://github.com/redhat-actions/oc-login#readme for how to retrieve these values. + OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }} + OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }} + + # ⬇️ EDIT with the port your application should be accessible on. + APP_PORT: 8080 + + # ⬇️ EDIT if you wish to set the kube context's namespace after login. Leave blank to use the default namespace. + OPENSHIFT_NAMESPACE: "" + + # If you wish to manually provide the APP_NAME and TAG, set them here, otherwise they will be auto-detected. + APP_NAME: "" + TAG: "" + +on: + # https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows + push: + # Edit to the branch(es) you want to build and deploy on each push. + branches: [ $default-branch ] jobs: - build: - name: Setup and Deploy - runs-on: ubuntu-latest + openshift-ci-cd: + name: Build and deploy to OpenShift + runs-on: ubuntu-20.04 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - # Set up the oc CLI, authenticate and deploy to OpenShift - - name: Set up oc CLI and deploy to OpenShift - uses: redhat-developer/openshift-actions@v2.1.0 - with: - version: '4.3' - openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_URL }} - parameters: '{"apitoken": "${{ secrets.API_TOKEN }}", "acceptUntrustedCerts": "true"}' - cmd: | - oc project ${PROJECT} - oc new-app ${GITHUB_WORKSPACE} --name ${APP_NAME} - # Expose the service created by using the oc CLI installed previously - - name: Execute additional oc commands + - name: Determine app name + if: env.APP_NAME == '' run: | - oc expose svc/${{ env.APP_NAME }} \ No newline at end of file + echo "APP_NAME=$(basename $PWD)" | tee -a $GITHUB_ENV + + - name: Determine tag + if: env.TAG == '' + run: | + echo "TAG=${GITHUB_SHA::7}" | tee -a $GITHUB_ENV + + # https://github.com/redhat-actions/buildah-build#readme + - name: Build from Dockerfile + uses: redhat-actions/buildah-build@v1 + with: + image: ${{ env.APP_NAME }} + tag: ${{ env.TAG }} + # If you don't have a dockerfile, see: + # https://github.com/redhat-actions/buildah-build#building-from-scratch + # Otherwise, point this to your Dockerfile relative to the repository root. + dockerfiles: | + ./Dockerfile + + # https://github.com/redhat-actions/push-to-registry#readme + - name: Push to registry + id: push-to-registry + uses: redhat-actions/push-to-registry@v1 + with: + image: ${{ env.APP_NAME }} + tag: ${{ env.TAG }} + registry: ${{ env.REGISTRY }} + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + + # The path the image was pushed to is now stored in ${{ steps.push-to-registry.outputs.registry-path }} + + # oc-login works on all platforms, but oc must be installed first. + # The GitHub Ubuntu runner already includes oc. + # Otherwise, https://github.com/redhat-actions/oc-installer#readme is available. + + # https://github.com/redhat-actions/oc-login#readme + - name: Log in to OpenShift + uses: redhat-actions/oc-login@v1 + with: + openshift_server_url: ${{ env.OPENSHIFT_SERVER }} + openshift_token: ${{ env.OPENSHIFT_TOKEN }} + insecure_skip_tls_verify: true + namespace: ${{ env.OPENSHIFT_NAMESPACE }} + + # This step should create a deployment, service, and route to run your app and expose it to the internet. + # Feel free to replace this with 'oc apply', 'helm install', or however you like to deploy your app. + - name: Create and expose app + run: | + export IMAGE="${{ steps.push-to-registry.outputs.registry-path }}" + export PORT=${{ env.APP_PORT }} + + export SELECTOR="app=${{ env.APP_NAME }}" + echo "SELECTOR=$SELECTOR" >> $GITHUB_ENV + + set -x + # Take down any old deployment + oc delete all --selector="$SELECTOR" + oc new-app --name $APP_NAME --docker-image="$IMAGE" + + # Make sure the app port is exposed + oc patch svc $APP_NAME -p "{ \"spec\": { \"ports\": [{ \"name\": \"$PORT-tcp\", \"port\": $PORT }] } }" + oc expose service $APP_NAME --port=$PORT + + oc get all --selector="$SELECTOR" + set +x + + export ROUTE="$(oc get route $APP_NAME -o jsonpath='{.spec.host}')" + echo "$APP_NAME is exposed at $ROUTE" + echo "ROUTE=$ROUTE" >> $GITHUB_ENV + + - name: View application route + run: | + [[ -n ${{ env.ROUTE }} ]] || (echo "Determining application route failed in previous step"; exit 1) + echo "======================== Your application is available at: ========================" + echo ${{ env.ROUTE }} + echo "===================================================================================" + echo + echo "Your app can be taken down with: \"oc delete all --selector='${{ env.SELECTOR }}'\"" diff --git a/ci/properties/openshift.properties.json b/ci/properties/openshift.properties.json index fd5fc0e..7157849 100644 --- a/ci/properties/openshift.properties.json +++ b/ci/properties/openshift.properties.json @@ -1,7 +1,7 @@ { "name": "OpenShift", - "description": "Set up the oc CLI in your GitHub Actions workflow and deploy your application to OpenShift.", + "description": "Build a Docker-based project and deploy it to OpenShift.", "creator": "Red Hat", "iconName": "openshift", "categories": null -} \ No newline at end of file +} From 443491da63e168984f7a45dd3697ac5c050ad6fd Mon Sep 17 00:00:00 2001 From: Tim Etchells Date: Mon, 30 Nov 2020 11:17:47 -0500 Subject: [PATCH 26/44] Add GitHub disclaimer Signed-off-by: Tim Etchells --- ci/openshift.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/openshift.yml b/ci/openshift.yml index 23fffaf..d34131f 100644 --- a/ci/openshift.yml +++ b/ci/openshift.yml @@ -1,3 +1,8 @@ +# 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. + ### The OpenShift Starter workflow will: # - Checkout your repository # - Perform a Docker build From cfbd40a9c206e07627cde8e1d349cd9be4d78b59 Mon Sep 17 00:00:00 2001 From: Tim Etchells Date: Mon, 30 Nov 2020 13:03:33 -0500 Subject: [PATCH 27/44] Add Dockerfile category to openshift workflow Signed-off-by: Tim Etchells --- ci/properties/openshift.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/openshift.properties.json b/ci/properties/openshift.properties.json index 7157849..53538c7 100644 --- a/ci/properties/openshift.properties.json +++ b/ci/properties/openshift.properties.json @@ -3,5 +3,5 @@ "description": "Build a Docker-based project and deploy it to OpenShift.", "creator": "Red Hat", "iconName": "openshift", - "categories": null + "categories": [ "Dockerfile" ] } From 04faecd24372e954be44e5fe95093292b8282620 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Tue, 1 Dec 2020 13:40:54 -0800 Subject: [PATCH 28/44] Update ruby.yml Noticed that this version of setup-ruby causes problems with the `set-env` deprecation. This just bumps it up to the latest commit on https://github.com/ruby/setup-ruby/ --- ci/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/ruby.yml b/ci/ruby.yml index 7f3bdd6..48242ff 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -24,7 +24,7 @@ jobs: # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 + uses: ruby/setup-ruby@21351ecc0a7c196081abca5dc55b08f085efe09a with: ruby-version: 2.6 - name: Install dependencies From b247fc699838f97b88e11429d29d416ea75eb284 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 4 Dec 2020 15:45:26 -0500 Subject: [PATCH 29/44] Fix CODEOWNERS (#730) --- CODEOWNERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 5c6704e..3732a32 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,3 @@ -* @actions-experience @advanced-security-code-scanning +* @actions/actions-experience + +/code-scanning/ @actions/advanced-security-code-scanning From 778f6e55ec4c085609530cab7e80909d6b031b2e Mon Sep 17 00:00:00 2001 From: David A Roberts Date: Sat, 5 Dec 2020 09:30:21 +1000 Subject: [PATCH 30/44] Add conda to system path --- ci/python-package-conda.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ci/python-package-conda.yml b/ci/python-package-conda.yml index 1567e18..7bae7e2 100644 --- a/ci/python-package-conda.yml +++ b/ci/python-package-conda.yml @@ -14,18 +14,21 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 - - name: Install dependencies + - name: Add conda to system path run: | # $CONDA is an environment variable pointing to the root of the miniconda directory - $CONDA/bin/conda env update --file environment.yml --name base + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment.yml --name base - name: Lint with flake8 run: | - $CONDA/bin/conda install flake8 + conda install flake8 # stop the build if there are Python syntax errors or undefined names - $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | conda install pytest - $CONDA/bin/pytest + pytest From 32294ec2354ba59641daf08817e05d23642bd932 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Mon, 7 Dec 2020 10:11:02 -0800 Subject: [PATCH 31/44] add in a person icon --- automation/properties/manual.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/properties/manual.properties.json b/automation/properties/manual.properties.json index f08cbc3..1befabe 100644 --- a/automation/properties/manual.properties.json +++ b/automation/properties/manual.properties.json @@ -1,6 +1,6 @@ { "name": "Manual workflow", "description": "Simple workflow that is manually triggered.", - "iconName": "blank", + "iconName": "octicon person", "categories": ["Automation"] } From 4dae3bbf12e6818e83374b9862805590f0f80e30 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Thu, 10 Dec 2020 17:35:47 +0000 Subject: [PATCH 32/44] Update .NET Core branding to .NET Per the branding that .NET 5.0 is the next release after .NET Core 3.1. --- ci/{dotnet-core-desktop.yml => dotnet-desktop.yml} | 0 ci/{dotnet-core.yml => dotnet.yml} | 4 ++-- ci/properties/dotnet-core.properties.json | 6 ------ ...sktop.properties.json => dotnet-desktop.properties.json} | 6 +++--- ci/properties/dotnet.properties.json | 6 ++++++ icons/dotnetcore.svg | 1 - 6 files changed, 11 insertions(+), 12 deletions(-) rename ci/{dotnet-core-desktop.yml => dotnet-desktop.yml} (100%) rename ci/{dotnet-core.yml => dotnet.yml} (91%) delete mode 100644 ci/properties/dotnet-core.properties.json rename ci/properties/{dotnet-core-desktop.properties.json => dotnet-desktop.properties.json} (56%) create mode 100644 ci/properties/dotnet.properties.json delete mode 100644 icons/dotnetcore.svg diff --git a/ci/dotnet-core-desktop.yml b/ci/dotnet-desktop.yml similarity index 100% rename from ci/dotnet-core-desktop.yml rename to ci/dotnet-desktop.yml diff --git a/ci/dotnet-core.yml b/ci/dotnet.yml similarity index 91% rename from ci/dotnet-core.yml rename to ci/dotnet.yml index 9ee1a7d..4cb32c0 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet.yml @@ -1,4 +1,4 @@ -name: .NET Core +name: .NET on: push: @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup .NET Core + - name: Setup .NET uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.301 diff --git a/ci/properties/dotnet-core.properties.json b/ci/properties/dotnet-core.properties.json deleted file mode 100644 index 3386a3d..0000000 --- a/ci/properties/dotnet-core.properties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": ".NET Core", - "description": "Build and test a .NET Core or ASP.NET Core project.", - "iconName": "dotnetcore", - "categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"] -} diff --git a/ci/properties/dotnet-core-desktop.properties.json b/ci/properties/dotnet-desktop.properties.json similarity index 56% rename from ci/properties/dotnet-core-desktop.properties.json rename to ci/properties/dotnet-desktop.properties.json index 9b2aa35..f6e1cb8 100644 --- a/ci/properties/dotnet-core-desktop.properties.json +++ b/ci/properties/dotnet-desktop.properties.json @@ -1,6 +1,6 @@ { - "name": ".NET Core Desktop", - "description": "Build, test, sign and publish a desktop application built on .NET Core.", - "iconName": "dotnetcore", + "name": ".NET Desktop", + "description": "Build, test, sign and publish a desktop application built on .NET.", + "iconName": "dotnet", "categories": ["C#", "Visual Basic", "WPF", ".NET"] } \ No newline at end of file diff --git a/ci/properties/dotnet.properties.json b/ci/properties/dotnet.properties.json new file mode 100644 index 0000000..b3feafb --- /dev/null +++ b/ci/properties/dotnet.properties.json @@ -0,0 +1,6 @@ +{ + "name": ".NET", + "description": "Build and test a .NET or ASP.NET Core project.", + "iconName": "dotnet", + "categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"] +} diff --git a/icons/dotnetcore.svg b/icons/dotnetcore.svg deleted file mode 100644 index 6d31060..0000000 --- a/icons/dotnetcore.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From b05136d6b3e487fb91fce91c0f3267de1a532efe Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Thu, 10 Dec 2020 17:41:44 +0000 Subject: [PATCH 33/44] Nit: Title restore step with "restore" This is more like how folks generally refer to it in .NET-land. --- ci/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dotnet.yml b/ci/dotnet.yml index 4cb32c0..354d2dc 100644 --- a/ci/dotnet.yml +++ b/ci/dotnet.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.301 - - name: Install dependencies + - name: Restore dependencies run: dotnet restore - name: Build run: dotnet build --configuration Release --no-restore From 0c4ccab691ac8790d8682218a943e8ffacc8cf97 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Thu, 10 Dec 2020 17:44:30 +0000 Subject: [PATCH 34/44] Don't specify configuration for dotnet build Since `dotnet test` below didn't specify the Release configuration, it used the default configuration (generally Debug). --- ci/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dotnet.yml b/ci/dotnet.yml index 354d2dc..198096c 100644 --- a/ci/dotnet.yml +++ b/ci/dotnet.yml @@ -20,6 +20,6 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --no-restore - name: Test run: dotnet test --no-restore --verbosity normal From 2c1a53ec9376a511d56922f740749cafaeb92f84 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Thu, 10 Dec 2020 17:42:57 +0000 Subject: [PATCH 35/44] Don't build when running tests If the workflow is going to split restore, build, and test into separate steps, each should use the result of the prior. Build was invoked with `--no-restore` but test was restoring, building, and then testing. --- ci/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dotnet.yml b/ci/dotnet.yml index 198096c..aa0a093 100644 --- a/ci/dotnet.yml +++ b/ci/dotnet.yml @@ -22,4 +22,4 @@ jobs: - name: Build run: dotnet build --no-restore - name: Test - run: dotnet test --no-restore --verbosity normal + run: dotnet test --no-build --verbosity normal From 14acff1f1ef8faf0b93e11598757206f04d9bfc5 Mon Sep 17 00:00:00 2001 From: Bharath KKB Date: Mon, 14 Dec 2020 18:38:42 -0600 Subject: [PATCH 36/44] fix: switch to new google actions org --- ci/google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/google.yml b/ci/google.yml index b9313b2..3d7f9f5 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v2 # Setup gcloud CLI - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@0.1.3 + - uses: google-github-actions/setup-gcloud@v0.2.0 with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} From c5e7bc70b545461c00a7e17980d939e3dd81cbca Mon Sep 17 00:00:00 2001 From: Bharath KKB Date: Mon, 14 Dec 2020 18:49:58 -0600 Subject: [PATCH 37/44] use GKE action for credentials --- ci/google.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/google.yml b/ci/google.yml index 3d7f9f5..0a53cfd 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -8,7 +8,7 @@ # # 3. Change the values for the GKE_ZONE, GKE_CLUSTER, IMAGE, and DEPLOYMENT_NAME environment variables (below). # -# For more support on how to run the workflow, please visit https://github.com/GoogleCloudPlatform/github-actions/tree/master/example-workflows/gke +# For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke name: Build and Deploy to GKE @@ -44,8 +44,11 @@ jobs: gcloud --quiet auth configure-docker # Get the GKE credentials so we can deploy to the cluster - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" + - uses: google-github-actions/get-gke-credentials@v0.2.1 + with: + cluster_name: ${{ secrets.GKE_PROJECT }} + location: ${{ env.GKE_ZONE }} + credentials: ${{ secrets.GKE_SA_KEY }} # Build the Docker image - name: Build From ab930e94bfd8f9196962625bf69b8c406bae15c1 Mon Sep 17 00:00:00 2001 From: Bharath KKB Date: Mon, 14 Dec 2020 18:59:18 -0600 Subject: [PATCH 38/44] fix cluster var --- ci/google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/google.yml b/ci/google.yml index 0a53cfd..cc3cffb 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -46,7 +46,7 @@ jobs: # Get the GKE credentials so we can deploy to the cluster - uses: google-github-actions/get-gke-credentials@v0.2.1 with: - cluster_name: ${{ secrets.GKE_PROJECT }} + cluster_name: ${{ env.GKE_CLUSTER }} location: ${{ env.GKE_ZONE }} credentials: ${{ secrets.GKE_SA_KEY }} From 038c492e5dcbab0b022a022f820754565ff8b23a Mon Sep 17 00:00:00 2001 From: Bikram Lama Date: Thu, 17 Dec 2020 01:57:39 +0545 Subject: [PATCH 39/44] Added PHP version (default 8.0) --- ci/laravel.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/laravel.yml b/ci/laravel.yml index b32ad88..5f9454c 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -12,6 +12,9 @@ jobs: runs-on: ubuntu-latest steps: + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' - uses: actions/checkout@v2 - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" From 916f29234a96c38a81bc253deed12d8d0904f35b Mon Sep 17 00:00:00 2001 From: Yashovardhan Dhanania Date: Sat, 19 Dec 2020 01:31:28 +0530 Subject: [PATCH 40/44] Android: Granting execute permission for gradlew (#70) * Granting execute permission for gradlew In https://github.com/yashovardhan99/HealersDiary, while testing this action, I noticed `./gradlew build` fails because it does not have execute permissions. Adding the execute permissions using `chmod` fixes this issue. * fixing line endings This should fix it * Renormalizing changes --- ci/android.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/android.yml b/ci/android.yml index c88c515..6954a61 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -17,5 +17,7 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew - name: Build with Gradle run: ./gradlew build From 1611798954e4c1ceda5e9e17e8ffaa30b436fe04 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Fri, 18 Dec 2020 12:54:48 -0800 Subject: [PATCH 41/44] Update ci/laravel.yml --- ci/laravel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/laravel.yml b/ci/laravel.yml index 5f9454c..d54921e 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: shivammathur/setup-php@v2 + - uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8 with: php-version: '8.0' - uses: actions/checkout@v2 From f9cb2aceea8109a06d08f57d70a55b473af28203 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 2 Jan 2021 16:06:19 -0500 Subject: [PATCH 42/44] haskell: ghc 8.10 and cabal 3.2 Signed-off-by: Rui Chen --- ci/haskell.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/haskell.yml b/ci/haskell.yml index 4c9a50c..c1d7dc7 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -15,8 +15,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1 with: - ghc-version: '8.8.2' - cabal-version: '3.0' + ghc-version: '8.10.3' + cabal-version: '3.2' - name: Cache uses: actions/cache@v1 From d5de0a136a5d4aa6ea93abebb62aac9180c087c0 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 2 Jan 2021 16:24:13 -0500 Subject: [PATCH 43/44] python: include python 3.9 for the build --- ci/django.yml | 2 +- ci/python-app.yml | 4 ++-- ci/python-package.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/django.yml b/ci/django.yml index 6ed9db8..dbde266 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/ci/python-app.yml b/ci/python-app.yml index 3b3e6a6..f6ad69a 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/ci/python-package.yml b/ci/python-package.yml index d2278f2..c88f6ce 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.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 From ebda693bc06206f7a6706a7c8c786b9ca5e6e4b6 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 4 Jan 2021 11:16:33 -0500 Subject: [PATCH 44/44] Add every version of Node.js that is supported upstream (#754) --- ci/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/node.js.yml b/ci/node.js.yml index ce0cdcf..632c1a6 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -16,7 +16,8 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [10.x, 12.x, 14.x, 15.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v2