From 99de2a93da8a1f1caeb7dde858c3fcd54365d64d Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Mon, 7 Oct 2019 10:10:49 -0400 Subject: [PATCH 01/63] Add R starter workflow This adds a workflow for [R packages](https://www.r-project.org/). It uses a [setup-r](https://github.com/r-lib/actions/tree/master/setup-r) action and two R packages - [remotes](https://remotes.r-lib.org/) - to install the R package dependencies - [rcmdcheck](https://github.com/r-lib/rcmdcheck) - to run and format the output of the package checking tool used in the R ecosystem. --- ci/properties/r.properties.json | 6 ++++++ ci/r.yml | 23 +++++++++++++++++++++++ icons/r.svg | 14 ++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ci/properties/r.properties.json create mode 100644 ci/r.yml create mode 100644 icons/r.svg diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json new file mode 100644 index 0000000..a9c6c61 --- /dev/null +++ b/ci/properties/r.properties.json @@ -0,0 +1,6 @@ +{ + "name": "R package", + "description": "Create and test an R package on multiple R versions.", + "iconName": "R", + "categories": ["R"] +} diff --git a/ci/r.yml b/ci/r.yml new file mode 100644 index 0000000..fb959bf --- /dev/null +++ b/ci/r.yml @@ -0,0 +1,23 @@ +name: R + +on: [push] + +jobs: + build: + + runs-on: macOS-latest + strategy: + max-parallel: 4 + matrix: + r-version: [3.5.3, 3.6.1] + + steps: + - uses: actions/checkout@v1 + - name: Set up R ${{ matrix.r-version }} + uses: rlib/actions/setup-r@v1 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: Rscript -e "install.packages(c('remotes', 'rcmdcheck'))" -e "remotes::install_deps(dependencies = TRUE)" + - name: Check + run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')" diff --git a/icons/r.svg b/icons/r.svg new file mode 100644 index 0000000..78281f7 --- /dev/null +++ b/icons/r.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + From 1a5f94bc68428bd1ba5b650f1c8161ec0c737da1 Mon Sep 17 00:00:00 2001 From: Ian Young Date: Thu, 7 Nov 2019 12:34:15 -0600 Subject: [PATCH 02/63] Add caching to Elixir workflow --- ci/elixir.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ci/elixir.yml b/ci/elixir.yml index eed27bc..643e1b6 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -12,10 +12,24 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Cache Mix Dependencies + uses: actions/cache@v1 + with: + path: deps + key: ${{ runner.OS }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: | + ${{ runner.OS }}-mix- - name: Install Dependencies run: | mix local.rebar --force mix local.hex --force mix deps.get + - name: Cache Build Files + uses: actions/cache@v1 + with: + path: _build + key: ${{ runner.OS }}-build-${{ github.sha }} + restore-keys: | + ${{ runner.OS }}-build- - name: Run Tests run: mix test From f1662044f7799fcef569623eccffa8a4ea67ba4b Mon Sep 17 00:00:00 2001 From: Christer Edvartsen Date: Thu, 14 Nov 2019 15:24:32 +0100 Subject: [PATCH 03/63] Use actions/cache for the Composer packages --- ci/php.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci/php.yml b/ci/php.yml index 8e856b8..4ac898c 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -12,8 +12,18 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v1 + with: + path: vendor + key: ${{ runner.os }}-node-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' run: composer install --prefer-dist --no-progress --no-suggest # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" From 4411c79d206d9dfa102cb0b414f34cb4f0a4ad3a Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Tue, 24 Mar 2020 11:38:16 -0400 Subject: [PATCH 04/63] docs: Correct location of corresponding properties.json files These *.properties.json files need to go in the properties/ subfolder of ci/ or automation/, not the root. Fixed example accordingly. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d81359..fdd9bf8 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/python-django.properties.json`. +For example: `ci/python-django.yml` and `ci/properties/python-django.properties.json`. **Valid properties:** * `name`: the name shown in onboarding From 1c2ed214e050c66dc35b215aa1353d5574e6c17b Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Thu, 16 Apr 2020 13:31:59 -0400 Subject: [PATCH 05/63] Update R workflow based on review feedback --- ci/r.yml | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/ci/r.yml b/ci/r.yml index fb959bf..cad232b 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -1,23 +1,37 @@ +# 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. +# +# See https://github.com/r-lib/actions/tree/master/examples#readme for +# additional example workflows available for the R community. + name: R -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: - runs-on: macOS-latest strategy: - max-parallel: 4 matrix: - r-version: [3.5.3, 3.6.1] + r-version: [3.5, 3.6] steps: - - uses: actions/checkout@v1 - - name: Set up R ${{ matrix.r-version }} - uses: rlib/actions/setup-r@v1 - with: - r-version: ${{ matrix.r-version }} - - name: Install dependencies - run: Rscript -e "install.packages(c('remotes', 'rcmdcheck'))" -e "remotes::install_deps(dependencies = TRUE)" - - name: Check - run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')" + - uses: actions/checkout@v2 + - name: Set up R ${{ matrix.r-version }} + uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} From 0254a244d2bb8562c48a66a9aed2d9b1667c38dc Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 24 Apr 2020 23:48:32 -0400 Subject: [PATCH 06/63] Add support for IBM Kuberenetes Service (IKS) This patch adds support for deploying an application to IKS by performing the following steps: 1. Downloading and installing the IBM Cloud CLI, 2. Building locally with Docker, 3. Pushing to ICR (IBM Container Registry), and 4. Deploying with kubectl to IKS Co-authored-by: JJ Asghar Signed-off-by: Steve Martinelli --- ci/ibm.yml | 74 +++++++++++++++++++++++++++++++ ci/properties/ibm.properties.json | 6 +++ icons/ibm.svg | 61 +++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 ci/ibm.yml create mode 100644 ci/properties/ibm.properties.json create mode 100644 icons/ibm.svg diff --git a/ci/ibm.yml b/ci/ibm.yml new file mode 100644 index 0000000..8af050f --- /dev/null +++ b/ci/ibm.yml @@ -0,0 +1,74 @@ +# This workflow will build a docker container, publish it to IBM Container Registry, and deploy it to IKS when a release is created +# +# To configure this workflow: +# +# 1. Ensure that your repository contains a Dockerfile +# 2. Setup secrets in your repository by going to settings: Create ICR_NAMESPACE and IBM_CLOUD_API_KEY +# 3. Change the values for the IBM_CLOUD_REGION, REGISTRY_HOSTNAME, IMAGE_NAME, IKS_CLUSTER, DEPLOYMENT_NAME, and PORT + +name: Build and Deploy to IKS + +on: + release: + types: [created] + +# Environment variables available to all jobs and steps in this workflow +env: + GITHUB_SHA: ${{ github.sha }} + IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }} + IBM_CLOUD_REGION: us-south + ICR_NAMESPACE: ${{ secrets.ICR_NAMESPACE }} + REGISTRY_HOSTNAME: us.icr.io + IMAGE_NAME: iks-test + IKS_CLUSTER: example-iks-cluster-name-or-id + DEPLOYMENT_NAME: iks-test + PORT: 5001 + +jobs: + setup-build-publish-deploy: + name: Setup, Build, Publish, and Deploy + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + # Download and Install IBM Cloud CLI + - name: Install IBM Cloud CLI + run: | + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud --version + ibmcloud config --check-version=false + ibmcloud plugin install -f kubernetes-service + ibmcloud plugin install -f container-registry + + # Authenticate with IBM Cloud CLI + - name: Authenticate with IBM Cloud CLI + run: | + ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" -r "${IBM_CLOUD_REGION}" -g default + ibmcloud cr region-set "${IBM_CLOUD_REGION}" + ibmcloud cr login + + # Build the Docker image + - name: Build with Docker + run: | + docker build -t "$REGISTRY_HOSTNAME"/"$ICR_NAMESPACE"/"$IMAGE_NAME":"$GITHUB_SHA" \ + --build-arg GITHUB_SHA="$GITHUB_SHA" \ + --build-arg GITHUB_REF="$GITHUB_REF" . + + # Push the image to IBM Container Registry + - name: Push the image to ICR + run: | + docker push $REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$GITHUB_SHA + + # Deploy the Docker image to the IKS cluster + - name: Deploy to IKS + run: | + ibmcloud ks cluster config --cluster $IKS_CLUSTER + kubectl config current-context + kubectl create deployment $DEPLOYMENT_NAME --image=$REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$GITHUB_SHA --dry-run -o yaml > deployment.yaml + kubectl apply -f deployment.yaml + kubectl rollout status deployment/$DEPLOYMENT_NAME + kubectl create service loadbalancer $DEPLOYMENT_NAME --tcp=80:$PORT --dry-run -o yaml > service.yaml + kubectl apply -f service.yaml + kubectl get services -o wide diff --git a/ci/properties/ibm.properties.json b/ci/properties/ibm.properties.json new file mode 100644 index 0000000..44d8996 --- /dev/null +++ b/ci/properties/ibm.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Build and Deploy to IKS", + "description": "Build a docker container, publish it to IBM Container Registry, and deploy to IKS.", + "iconName": "ibm", + "categories": null +} \ No newline at end of file diff --git a/icons/ibm.svg b/icons/ibm.svg new file mode 100644 index 0000000..3732033 --- /dev/null +++ b/icons/ibm.svg @@ -0,0 +1,61 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + + + + + + From 951dfd0da3eea05f7a3e56adebf433243d15f37f Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Fri, 1 May 2020 06:56:47 -0400 Subject: [PATCH 07/63] Update the description with the proper case Update the "Wpf" in the description to "WPF" to reflect the proper case. --- ci/properties/wpf-dotnet-core.properties.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/wpf-dotnet-core.properties.json b/ci/properties/wpf-dotnet-core.properties.json index f43ea35..c083d71 100644 --- a/ci/properties/wpf-dotnet-core.properties.json +++ b/ci/properties/wpf-dotnet-core.properties.json @@ -1,6 +1,6 @@ { "name": "WPF .NET Core", - "description": "Build, test and publish a Wpf application built on .NET Core.", + "description": "Build, test and publish a WPF application built on .NET Core.", "iconName": "dotnetcore", "categories": ["C#", "Visual Basic", "WPF", ".NET"] -} \ No newline at end of file +} From f543db49dbe97d4ae5d508a05dfb9f6e630227a7 Mon Sep 17 00:00:00 2001 From: Tim Dorr Date: Fri, 1 May 2020 18:53:57 -0400 Subject: [PATCH 08/63] Fix source image name on docker tag This resolves an issue created by #472 --- ci/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index 1a1805f..9e80e76 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -72,5 +72,5 @@ jobs: echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION - docker tag image $IMAGE_ID:$VERSION + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION From dd7519f49ef5673e46a4eaafa1f862977510b465 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Sun, 3 May 2020 07:57:14 -0400 Subject: [PATCH 09/63] Rename the workflow files and properties files from WPF to Desktop. --- ci/{wpf-dotnet-core.yml => dotnet-core-desktop.yml} | 10 +++++----- ci/properties/dotnet-core-desktop.properties.json | 6 ++++++ ci/properties/wpf-dotnet-core.properties.json | 6 ------ 3 files changed, 11 insertions(+), 11 deletions(-) rename ci/{wpf-dotnet-core.yml => dotnet-core-desktop.yml} (94%) create mode 100644 ci/properties/dotnet-core-desktop.properties.json delete mode 100644 ci/properties/wpf-dotnet-core.properties.json diff --git a/ci/wpf-dotnet-core.yml b/ci/dotnet-core-desktop.yml similarity index 94% rename from ci/wpf-dotnet-core.yml rename to ci/dotnet-core-desktop.yml index 80ec3e5..0b9e454 100644 --- a/ci/wpf-dotnet-core.yml +++ b/ci/dotnet-core-desktop.yml @@ -3,9 +3,9 @@ # separate terms of service, privacy policy, and support # documentation. -# This workflow will build, test and package a WPF desktop application +# This workflow will build, test and package a WPF or Windows Forms desktop application # built on .NET Core. -# To learn how to migrate your existing WPF application to .NET Core, +# To learn how to migrate your existing application to .NET Core, # refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework # # To configure this workflow: @@ -36,7 +36,7 @@ # For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, # refer to https://github.com/microsoft/github-actions-for-desktop-apps -name: WPF .NET Core +name: .NET Core Desktop on: push: @@ -81,8 +81,8 @@ jobs: - name: Execute unit tests run: dotnet test - # Restore the WPF application to populate the obj folder with RuntimeIdentifiers - - name: Restore the WPF application + # Restore the application to populate the obj folder with RuntimeIdentifiers + - name: Restore the application run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration env: Configuration: ${{ matrix.configuration }} diff --git a/ci/properties/dotnet-core-desktop.properties.json b/ci/properties/dotnet-core-desktop.properties.json new file mode 100644 index 0000000..e796c4a --- /dev/null +++ b/ci/properties/dotnet-core-desktop.properties.json @@ -0,0 +1,6 @@ +{ + "name": ".NET Core Desktop", + "description": "Build, test and publish a Wpf or Windows Forms application built on .NET Core.", + "iconName": "dotnetcore", + "categories": ["C#", "Visual Basic", "WPF", ".NET", "WindowsForms"] +} \ No newline at end of file diff --git a/ci/properties/wpf-dotnet-core.properties.json b/ci/properties/wpf-dotnet-core.properties.json deleted file mode 100644 index f43ea35..0000000 --- a/ci/properties/wpf-dotnet-core.properties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "WPF .NET Core", - "description": "Build, test and publish a Wpf application built on .NET Core.", - "iconName": "dotnetcore", - "categories": ["C#", "Visual Basic", "WPF", ".NET"] -} \ No newline at end of file From 6ea0e1fa1691de713c156c6925517d4f2e88d7d1 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Sun, 3 May 2020 08:04:10 -0400 Subject: [PATCH 10/63] Reword the description. --- ci/properties/dotnet-core-desktop.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/dotnet-core-desktop.properties.json b/ci/properties/dotnet-core-desktop.properties.json index e796c4a..0299220 100644 --- a/ci/properties/dotnet-core-desktop.properties.json +++ b/ci/properties/dotnet-core-desktop.properties.json @@ -1,6 +1,6 @@ { "name": ".NET Core Desktop", - "description": "Build, test and publish a Wpf or Windows Forms application built on .NET Core.", + "description": "Build, test, sign and publish a desktop application built on .NET Core.", "iconName": "dotnetcore", "categories": ["C#", "Visual Basic", "WPF", ".NET", "WindowsForms"] } \ No newline at end of file From fc935ad05273b7b0a0e889cee47b1807c139f8ac Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Sun, 3 May 2020 08:12:18 -0400 Subject: [PATCH 11/63] Added 'sign' to the workflow description. --- ci/dotnet-core-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dotnet-core-desktop.yml b/ci/dotnet-core-desktop.yml index 0b9e454..ed37b70 100644 --- a/ci/dotnet-core-desktop.yml +++ b/ci/dotnet-core-desktop.yml @@ -3,7 +3,7 @@ # separate terms of service, privacy policy, and support # documentation. -# This workflow will build, test and package a WPF or Windows Forms desktop application +# This workflow will build, test, sign and package a WPF or Windows Forms desktop application # built on .NET Core. # To learn how to migrate your existing application to .NET Core, # refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework From 7176a039ba61ea5566c9778675c780ae79865f2c Mon Sep 17 00:00:00 2001 From: Christoph Dietrich Date: Mon, 4 May 2020 12:42:34 +0200 Subject: [PATCH 12/63] Update docker-publish.yml If you change the IMAGE_NAME to something which is not "image" it will fail, because at the bottom was a hard fix "image" inside. Now its running. --- ci/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index 1a1805f..9e80e76 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -72,5 +72,5 @@ jobs: echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION - docker tag image $IMAGE_ID:$VERSION + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION From e4d7e16da8f4825ccf3ad4b884b954621328fcf9 Mon Sep 17 00:00:00 2001 From: Bjorn Stromberg Date: Tue, 5 May 2020 11:33:35 +0900 Subject: [PATCH 13/63] Add node v14 --- ci/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/node.js.yml b/ci/node.js.yml index e772a1c..673bd33 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x] + node-version: [10.x, 12.x, 14.x] steps: - uses: actions/checkout@v2 From 6eb7d7ec6200419c0e4eff53a3ef93d7e600647e Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Fri, 8 May 2020 09:48:58 +0200 Subject: [PATCH 14/63] Remove deprecated '--no-suggest' flag From the upgrade guide for Composer v2.0: > Deprecated --no-suggest flag as it is not needed anymore https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-composer-cli-users --- ci/laravel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/laravel.yml b/ci/laravel.yml index 7fc4665..a895246 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -16,7 +16,7 @@ jobs: - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - name: Generate key run: php artisan key:generate - name: Directory Permissions From 72408e6c620fc830ea97457baf6916d92b0352dc Mon Sep 17 00:00:00 2001 From: Ankit Popli Date: Sun, 10 May 2020 13:47:21 +0530 Subject: [PATCH 15/63] fix: use the IMAGE_NAME variable current behavior: changing the IMAGE_NAME variable breaks the build expected behavior: changing the IMAGE_NAME should not break the build --- ci/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index 1a1805f..9e80e76 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -72,5 +72,5 @@ jobs: echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION - docker tag image $IMAGE_ID:$VERSION + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION From 4e9268c2d390db4f2a7694c5f7d25ec6e1d748b3 Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Tue, 12 May 2020 10:49:36 +0200 Subject: [PATCH 16/63] Bump setup-python from v1 to v2 --- ci/python-app.yml | 2 +- ci/python-package.yml | 2 +- ci/python-publish.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/python-app.yml b/ci/python-app.yml index 900e442..c7f5067 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies diff --git a/ci/python-package.yml b/ci/python-package.yml index b425371..f1abc2f 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/ci/python-publish.yml b/ci/python-publish.yml index d5f3859..4e1ef42 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: '3.x' - name: Install dependencies From 5802cb730239f3f1da75deb599a9ab0f178e479a Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Fri, 15 May 2020 16:49:20 -0700 Subject: [PATCH 17/63] Add script and workflow to sync the set of starter-workflows for GHES --- .github/workflows/sync_ghes.yaml | 26 ++++++ .gitignore | 1 + .vscode/launch.json | 21 +++++ script/exec.ts | 42 +++++++++ script/index.ts | 144 +++++++++++++++++++++++++++++++ script/package-lock.json | 112 ++++++++++++++++++++++++ script/package.json | 19 ++++ script/settings.json | 20 +++++ script/tsconfig.json | 5 ++ 9 files changed, 390 insertions(+) create mode 100644 .github/workflows/sync_ghes.yaml create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 script/exec.ts create mode 100755 script/index.ts create mode 100644 script/package-lock.json create mode 100644 script/package.json create mode 100644 script/settings.json create mode 100644 script/tsconfig.json diff --git a/.github/workflows/sync_ghes.yaml b/.github/workflows/sync_ghes.yaml new file mode 100644 index 0000000..6a0be1b --- /dev/null +++ b/.github/workflows/sync_ghes.yaml @@ -0,0 +1,26 @@ +on: + push: + branches: + - master + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* + git config user.email "cschleiden@github.com" + git config user.name "GitHub Actions" + - uses: actions/setup-node@v1 + with: + node-version: '12' + - name: Check starter workflows for GHES compat + run: | + npm ci + npx ts-node-script ./index.ts + working-directory: ./script + - run: | + git add -A + git commit -m "Updating GHES workflows" + - run: git push \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d844aa1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +script/node_modules \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..a5cc146 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "args": ["${workspaceRoot}/script/index.ts"], + "runtimeArgs": ["-r", "ts-node/register"], + "cwd": "${workspaceRoot}/script", + "protocol": "inspector", + "internalConsoleOptions": "openOnSessionStart", + "env": { + "TS_NODE_IGNORE": "false" + } + } + ] +} \ No newline at end of file diff --git a/script/exec.ts b/script/exec.ts new file mode 100644 index 0000000..e529324 --- /dev/null +++ b/script/exec.ts @@ -0,0 +1,42 @@ +import { spawn } from "child_process"; + +export class ExecResult { + stdout = ""; + exitCode = 0; +} + +/** + * Executes a process + */ +export async function exec( + command: string, + args: string[] = [], + allowAllExitCodes: boolean = false +): Promise { + process.stdout.write(`EXEC: ${command} ${args.join(" ")}\n`); + return new Promise((resolve, reject) => { + const execResult = new ExecResult(); + const cp = spawn(command, args, {}); + + // STDOUT + cp.stdout.on("data", (data) => { + process.stdout.write(data); + execResult.stdout += data.toString(); + }); + + // STDERR + cp.stderr.on("data", (data) => { + process.stderr.write(data); + }); + + // Close + cp.on("close", (code) => { + execResult.exitCode = code; + if (code === 0 || allowAllExitCodes) { + resolve(execResult); + } else { + reject(new Error(`Command exited with code ${code}`)); + } + }); + }); +} diff --git a/script/index.ts b/script/index.ts new file mode 100755 index 0000000..943ffc3 --- /dev/null +++ b/script/index.ts @@ -0,0 +1,144 @@ +#!/usr/bin/env npx ts-node +import { promises as fs } from "fs"; +import { safeLoad } from "js-yaml"; +import { basename, extname, join } from "path"; +import { exec } from "./exec"; + +interface WorkflowDesc { + folder: string; + id: string; +} + +interface WorkflowsCheckResult { + compatibleWorkflows: WorkflowDesc[]; + incompatibleWorkflows: WorkflowDesc[]; +} + +async function checkWorkflows( + folders: string[], + enabledActions: string[] +): Promise { + const result: WorkflowsCheckResult = { + compatibleWorkflows: [], + incompatibleWorkflows: [], + }; + + for (const folder of folders) { + const dir = await fs.readdir(folder, { + withFileTypes: true, + }); + + for (const e of dir) { + if (e.isFile()) { + const workflowFilePath = join(folder, e.name); + const enabled = await checkWorkflow(workflowFilePath, enabledActions); + + const workflowDesc: WorkflowDesc = { + folder, + id: basename(e.name, extname(e.name)), + }; + + if (!enabled) { + result.incompatibleWorkflows.push(workflowDesc); + } else { + result.compatibleWorkflows.push(workflowDesc); + } + } + } + } + + return result; +} + +/** + * Check if a workflow only the given set of actions. + * + * @param workflowPath Path to workflow yaml file + * @param enabledActions List of enabled actions + */ +async function checkWorkflow( + workflowPath: string, + enabledActions: string[] +): Promise { + // Create set with lowercase action names for easier, case-insensitive lookup + const enabledActionsSet = new Set(enabledActions.map((x) => x.toLowerCase())); + + try { + const workflowFileContent = await fs.readFile(workflowPath, "utf8"); + const workflow = safeLoad(workflowFileContent); + + for (const job of Object.keys(workflow.jobs || {}).map( + (k) => workflow.jobs[k] + )) { + for (const step of job.steps || []) { + if (!!step.uses) { + // Check if allowed action + const [actionName, _] = step.uses.split("@"); + if (!enabledActionsSet.has(actionName.toLowerCase())) { + return false; + } + } + } + } + + // All used actions are enabled 🎉 + return true; + } catch (e) { + console.error("Error while checking workflow", e); + throw e; + } +} + +(async function main() { + try { + const settings = require("./settings.json"); + + const result = await checkWorkflows( + settings.folders, + settings.enabledActions + ); + + console.group( + `Found ${result.compatibleWorkflows.length} starter workflows compatible with GHES:` + ); + console.log( + result.compatibleWorkflows.map((x) => `${x.folder}/${x.id}`).join("\n") + ); + console.groupEnd(); + + console.group( + `Ignored ${result.incompatibleWorkflows.length} starter-workflows incompatible with GHES:` + ); + console.log( + result.incompatibleWorkflows.map((x) => `${x.folder}/${x.id}`).join("\n") + ); + console.groupEnd(); + + console.log("Switch to GHES branch"); + await exec("git", ["checkout", "ghes"]); + + // In order to sync from master, we might need to remove some workflows, add some + // and modify others. The lazy approach is to delete all workflows first, and then + // just bring the compatible ones over from the master branch. We let git figure out + // whether it's a deletion, add, or modify and commit the new state. + console.log("Remove all workflows"); + await exec("rm", ["-fr", ...settings.folders]); + + console.log("Sync changes from master for compatible workflows"); + await exec("git", [ + "checkout", + "master", + "--", + ...Array.prototype.concat.apply( + [], + result.compatibleWorkflows.map((x) => [ + join(x.folder, `${x.id}.yml`), + join(x.folder, "properties", `${x.id}.properties.json`), + ]) + ), + ]); + } catch (e) { + console.error("Unhandled error while syncing workflows", e); + process.exitCode = 1; + } +})(); diff --git a/script/package-lock.json b/script/package-lock.json new file mode 100644 index 0000000..ebcd318 --- /dev/null +++ b/script/package-lock.json @@ -0,0 +1,112 @@ +{ + "name": "sync-ghes-actions", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/js-yaml": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.4.tgz", + "integrity": "sha512-fYMgzN+9e28R81weVN49inn/u798ruU91En1ZnGvSZzCRc5jXx9B2EDhlRaWmcO1RIxFHL8AajRXzxDuJu93+A==", + "dev": true + }, + "@types/node": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.1.tgz", + "integrity": "sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA==", + "dev": true + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "ts-node": { + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", + "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, + "typescript": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", + "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + } + } +} diff --git a/script/package.json b/script/package.json new file mode 100644 index 0000000..c3c9872 --- /dev/null +++ b/script/package.json @@ -0,0 +1,19 @@ +{ + "name": "sync-ghes-actions", + "version": "1.0.0", + "main": "index.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "github/c2c-actions-experience", + "license": "MIT", + "devDependencies": { + "@types/js-yaml": "^3.12.4", + "@types/node": "^14.0.1", + "ts-node": "^8.10.1", + "typescript": "^3.9.2" + }, + "dependencies": { + "js-yaml": "^3.13.1" + } +} diff --git a/script/settings.json b/script/settings.json new file mode 100644 index 0000000..977c6f5 --- /dev/null +++ b/script/settings.json @@ -0,0 +1,20 @@ +{ + "folders": [ + "../ci", + "../automation" + ], + "enabledActions": [ + "actions/checkout", + "actions/create-release", + "actions/delete-package-versions", + "actions/download-artifact", + "actions/setup-dotnet", + "actions/setup-go", + "actions/setup-java", + "actions/setup-node", + "actions/stale", + "actions/starter-workflows", + "actions/upload-artifact", + "actions/upload-release-asset" + ] +} diff --git a/script/tsconfig.json b/script/tsconfig.json new file mode 100644 index 0000000..7c50a20 --- /dev/null +++ b/script/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + }, + "include": ["*.ts"] +} \ No newline at end of file From 641db8990d62826105984a170af3a1ee916e79c6 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Sun, 17 May 2020 22:16:42 -0400 Subject: [PATCH 18/63] clean up IBM title and icon using a different icon for IBM Cloud, ran svgo on it, too. --- ci/properties/ibm.properties.json | 4 +- icons/ibm.svg | 62 +------------------------------ 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/ci/properties/ibm.properties.json b/ci/properties/ibm.properties.json index 44d8996..59aa8ab 100644 --- a/ci/properties/ibm.properties.json +++ b/ci/properties/ibm.properties.json @@ -1,6 +1,6 @@ { - "name": "Build and Deploy to IKS", - "description": "Build a docker container, publish it to IBM Container Registry, and deploy to IKS.", + "name": "Deploy to IBM Kubernetes Service", + "description": "Build a docker container, publish it to IBM Container Registry, and deploy to IBM Kubernetes Service.", "iconName": "ibm", "categories": null } \ No newline at end of file diff --git a/icons/ibm.svg b/icons/ibm.svg index 3732033..7139661 100644 --- a/icons/ibm.svg +++ b/icons/ibm.svg @@ -1,61 +1 @@ - - - - -Created by potrace 1.16, written by Peter Selinger 2001-2019 - - - - - - - - - - - - + \ No newline at end of file From e16f45a27fbee43beb5a95ff4d7ae2a265b528d2 Mon Sep 17 00:00:00 2001 From: Steve Martinelli <4118756+stevemar@users.noreply.github.com> Date: Mon, 18 May 2020 23:13:25 -0400 Subject: [PATCH 19/63] Update ibm.properties.json one last tweak on official name --- ci/properties/ibm.properties.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/properties/ibm.properties.json b/ci/properties/ibm.properties.json index 59aa8ab..25ebf8a 100644 --- a/ci/properties/ibm.properties.json +++ b/ci/properties/ibm.properties.json @@ -1,6 +1,6 @@ { - "name": "Deploy to IBM Kubernetes Service", - "description": "Build a docker container, publish it to IBM Container Registry, and deploy to IBM Kubernetes Service.", + "name": "Deploy to IBM Cloud Kubernetes Service", + "description": "Build a docker container, publish it to IBM Cloud Container Registry, and deploy to IBM Cloud Kubernetes Service.", "iconName": "ibm", "categories": null -} \ No newline at end of file +} From 62f6872b4ea8dd11b34ded263418d156067e6d15 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Wed, 20 May 2020 10:00:39 -0700 Subject: [PATCH 20/63] Move ghes-sync into subfolder --- .github/workflows/sync_ghes.yaml | 2 +- .gitignore | 2 +- script/{ => sync-ghes}/exec.ts | 0 script/{ => sync-ghes}/index.ts | 5 ++++- script/{ => sync-ghes}/package-lock.json | 0 script/{ => sync-ghes}/package.json | 0 script/{ => sync-ghes}/settings.json | 0 script/{ => sync-ghes}/tsconfig.json | 0 8 files changed, 6 insertions(+), 3 deletions(-) rename script/{ => sync-ghes}/exec.ts (100%) rename script/{ => sync-ghes}/index.ts (95%) rename script/{ => sync-ghes}/package-lock.json (100%) rename script/{ => sync-ghes}/package.json (100%) rename script/{ => sync-ghes}/settings.json (100%) rename script/{ => sync-ghes}/tsconfig.json (100%) diff --git a/.github/workflows/sync_ghes.yaml b/.github/workflows/sync_ghes.yaml index 6a0be1b..0b1d289 100644 --- a/.github/workflows/sync_ghes.yaml +++ b/.github/workflows/sync_ghes.yaml @@ -19,7 +19,7 @@ jobs: run: | npm ci npx ts-node-script ./index.ts - working-directory: ./script + working-directory: ./script/sync-ghes - run: | git add -A git commit -m "Updating GHES workflows" diff --git a/.gitignore b/.gitignore index d844aa1..c5364f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -script/node_modules \ No newline at end of file +script/**/node_modules \ No newline at end of file diff --git a/script/exec.ts b/script/sync-ghes/exec.ts similarity index 100% rename from script/exec.ts rename to script/sync-ghes/exec.ts diff --git a/script/index.ts b/script/sync-ghes/index.ts similarity index 95% rename from script/index.ts rename to script/sync-ghes/index.ts index 943ffc3..c5633c2 100755 --- a/script/index.ts +++ b/script/sync-ghes/index.ts @@ -51,7 +51,7 @@ async function checkWorkflows( } /** - * Check if a workflow only the given set of actions. + * Check if a workflow uses only the given set of actions. * * @param workflowPath Path to workflow yaml file * @param enabledActions List of enabled actions @@ -75,6 +75,9 @@ async function checkWorkflow( // Check if allowed action const [actionName, _] = step.uses.split("@"); if (!enabledActionsSet.has(actionName.toLowerCase())) { + console.info( + `Workflow ${workflowPath} uses '${actionName}' which is not supported for GHES.` + ); return false; } } diff --git a/script/package-lock.json b/script/sync-ghes/package-lock.json similarity index 100% rename from script/package-lock.json rename to script/sync-ghes/package-lock.json diff --git a/script/package.json b/script/sync-ghes/package.json similarity index 100% rename from script/package.json rename to script/sync-ghes/package.json diff --git a/script/settings.json b/script/sync-ghes/settings.json similarity index 100% rename from script/settings.json rename to script/sync-ghes/settings.json diff --git a/script/tsconfig.json b/script/sync-ghes/tsconfig.json similarity index 100% rename from script/tsconfig.json rename to script/sync-ghes/tsconfig.json From 88d425bbe7b0a404065b83ddf3c08ae3b2d4581d Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Wed, 20 May 2020 10:40:26 -0700 Subject: [PATCH 21/63] Sync icons only for supported workflows --- script/sync-ghes/index.ts | 14 +++++++++++++- script/sync-ghes/settings.json | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index c5633c2..b63c124 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -7,6 +7,7 @@ import { exec } from "./exec"; interface WorkflowDesc { folder: string; id: string; + iconName: string; } interface WorkflowsCheckResult { @@ -33,9 +34,18 @@ async function checkWorkflows( const workflowFilePath = join(folder, e.name); const enabled = await checkWorkflow(workflowFilePath, enabledActions); + const workflowId = basename(e.name, extname(e.name)); + const workflowProperties = require(join( + folder, + "properties", + `${workflowId}.properties.json` + )); + const iconName = workflowProperties["iconName"]; + const workflowDesc: WorkflowDesc = { folder, - id: basename(e.name, extname(e.name)), + id: workflowId, + iconName, }; if (!enabled) { @@ -126,6 +136,7 @@ async function checkWorkflow( // whether it's a deletion, add, or modify and commit the new state. console.log("Remove all workflows"); await exec("rm", ["-fr", ...settings.folders]); + await exec("rm", ["-fr", "../../icons"]); console.log("Sync changes from master for compatible workflows"); await exec("git", [ @@ -137,6 +148,7 @@ async function checkWorkflow( result.compatibleWorkflows.map((x) => [ join(x.folder, `${x.id}.yml`), join(x.folder, "properties", `${x.id}.properties.json`), + join("../../icons", `${x.iconName}.svg`), ]) ), ]); diff --git a/script/sync-ghes/settings.json b/script/sync-ghes/settings.json index 977c6f5..050ea0a 100644 --- a/script/sync-ghes/settings.json +++ b/script/sync-ghes/settings.json @@ -1,7 +1,7 @@ { "folders": [ - "../ci", - "../automation" + "../../ci", + "../../automation" ], "enabledActions": [ "actions/checkout", From af4b66354beeefe58f5bba80e01cade27afcc9bd Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Wed, 20 May 2020 10:54:19 -0700 Subject: [PATCH 22/63] Only sync svg icons --- script/sync-ghes/index.ts | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index b63c124..5390664 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -7,7 +7,8 @@ import { exec } from "./exec"; interface WorkflowDesc { folder: string; id: string; - iconName: string; + iconName?: string; + iconType?: "svg" | "octicon"; } interface WorkflowsCheckResult { @@ -40,12 +41,14 @@ async function checkWorkflows( "properties", `${workflowId}.properties.json` )); - const iconName = workflowProperties["iconName"]; + const iconName: string | undefined = workflowProperties["iconName"]; const workflowDesc: WorkflowDesc = { folder, id: workflowId, iconName, + iconType: + iconName && iconName.startsWith("octicon") ? "octicon" : "svg", }; if (!enabled) { @@ -145,11 +148,18 @@ async function checkWorkflow( "--", ...Array.prototype.concat.apply( [], - result.compatibleWorkflows.map((x) => [ - join(x.folder, `${x.id}.yml`), - join(x.folder, "properties", `${x.id}.properties.json`), - join("../../icons", `${x.iconName}.svg`), - ]) + result.compatibleWorkflows.map((x) => { + const r = [ + join(x.folder, `${x.id}.yml`), + join(x.folder, "properties", `${x.id}.properties.json`), + ]; + + if (x.iconType === "svg") { + r.push(join("../../icons", `${x.iconName}.svg`)); + } + + return r; + }) ), ]); } catch (e) { From 70c22e93a371758a899200e87f865d0df7ed3b6a Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Wed, 20 May 2020 11:39:30 -0700 Subject: [PATCH 23/63] Name GHES sync workflow --- .github/workflows/sync_ghes.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_ghes.yaml b/.github/workflows/sync_ghes.yaml index 0b1d289..397c173 100644 --- a/.github/workflows/sync_ghes.yaml +++ b/.github/workflows/sync_ghes.yaml @@ -1,3 +1,5 @@ +name: Sync workflows for GHES + on: push: branches: @@ -23,4 +25,4 @@ jobs: - run: | git add -A git commit -m "Updating GHES workflows" - - run: git push \ No newline at end of file + - run: git push From a83abcc8723c99e08ff18aa6efc3a5691d908918 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 19 May 2020 09:51:39 -0700 Subject: [PATCH 24/63] Script to validate the main parts of workflow data --- .github/workflows/validate-data.yaml | 19 ++++ script/validate-data/index.ts | 116 +++++++++++++++++++++++ script/validate-data/package-lock.json | 122 +++++++++++++++++++++++++ script/validate-data/package.json | 21 +++++ script/validate-data/settings.json | 6 ++ script/validate-data/tsconfig.json | 5 + 6 files changed, 289 insertions(+) create mode 100644 .github/workflows/validate-data.yaml create mode 100755 script/validate-data/index.ts create mode 100644 script/validate-data/package-lock.json create mode 100644 script/validate-data/package.json create mode 100644 script/validate-data/settings.json create mode 100644 script/validate-data/tsconfig.json diff --git a/.github/workflows/validate-data.yaml b/.github/workflows/validate-data.yaml new file mode 100644 index 0000000..3abd612 --- /dev/null +++ b/.github/workflows/validate-data.yaml @@ -0,0 +1,19 @@ +on: + push: + pull_request: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: "12" + + - name: Validate workflows + run: | + npm ci + npx ts-node-script ./index.ts + working-directory: ./script/validate-data diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts new file mode 100755 index 0000000..0809372 --- /dev/null +++ b/script/validate-data/index.ts @@ -0,0 +1,116 @@ +#!/usr/bin/env npx ts-node +import { promises as fs } from "fs"; +import { safeLoad } from "js-yaml"; +import { basename, extname, join } from "path"; +import { Validator as validator } from "jsonschema"; +import { endGroup, error, setFailed, startGroup } from '@actions/core'; + +interface WorkflowWithErrors { + id: string; + errors: string[]; +} + +interface WorkflowProperties { + name: string; + description: string; + iconName: string; + categories: string[]; +} + +const propertiesSchema = { + type: "object", + properties: { + name: { type: "string", required: true }, + description: { type: "string", required: true }, + iconName: { type: "string", required: true }, + categories: { + anyOf: [ + { + type: "array", + items: { type: "string" } + }, + { + type: "null", + } + ], + required: true + }, + } +} + +async function checkWorkflows(folders: string[]): Promise { + const result: WorkflowWithErrors[] = [] + + for (const folder of folders) { + const dir = await fs.readdir(folder, { + withFileTypes: true, + }); + + for (const e of dir) { + if (e.isFile()) { + const fileType = basename(e.name, extname(e.name)) + + const workflowFilePath = join(folder, e.name); + const propertiesFilePath = join(folder, "properties", `${fileType}.properties.json`) + + const errors = await checkWorkflow(workflowFilePath, propertiesFilePath); + if (errors.errors.length > 0) { + result.push(errors) + } + } + } + } + + return result; +} + +async function checkWorkflow(workflowPath: string, propertiesPath: string): Promise { + let workflowErrors: WorkflowWithErrors = { + id: workflowPath, + errors: [] + } + + try { + const workflowFileContent = await fs.readFile(workflowPath, "utf8"); + safeLoad(workflowFileContent); // Validate yaml parses without error + + const propertiesFileContent = await fs.readFile(propertiesPath, "utf8") + const properties: WorkflowProperties = JSON.parse(propertiesFileContent) + + let v = new validator(); + const res = v.validate(properties, propertiesSchema) + workflowErrors.errors = res.errors.map(e => e.toString()) + + if (properties.iconName && !properties.iconName.startsWith("octicon")) { + try { + await fs.access(`../../icons/${properties.iconName}.svg`) + } catch (e) { + workflowErrors.errors.push(`No icon named ${properties.iconName} found`) + } + } + } catch (e) { + workflowErrors.errors.push(e.toString()) + } + return workflowErrors; +} + +(async function main() { + try { + const settings = require("./settings.json"); + const erroredWorkflows = await checkWorkflows( + settings.folders + ) + + if (erroredWorkflows.length > 0) { + startGroup(`Found ${erroredWorkflows.length} workflows with errors:`); + erroredWorkflows.forEach(erroredWorkflow => { + error(`Errors in ${erroredWorkflow.id} - ${erroredWorkflow.errors.map(e => e.toString()).join(", ")}`) + }) + endGroup(); + setFailed(`Found ${erroredWorkflows.length} workflows with errors`); + } + } catch (e) { + error(`Unhandled error while syncing workflows: ${e}`); + setFailed(`Unhandled error`) + } +})(); diff --git a/script/validate-data/package-lock.json b/script/validate-data/package-lock.json new file mode 100644 index 0000000..110d23f --- /dev/null +++ b/script/validate-data/package-lock.json @@ -0,0 +1,122 @@ +{ + "name": "sync-ghes-actions", + "version": "1.0.0", + "lockfileVersion": 1, + "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==" + }, + "@types/js-yaml": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.4.tgz", + "integrity": "sha512-fYMgzN+9e28R81weVN49inn/u798ruU91En1ZnGvSZzCRc5jXx9B2EDhlRaWmcO1RIxFHL8AajRXzxDuJu93+A==", + "dev": true + }, + "@types/node": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.1.tgz", + "integrity": "sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA==", + "dev": true + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonschema": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.6.tgz", + "integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==" + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "ts-node": { + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", + "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, + "typescript": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", + "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + } + } +} diff --git a/script/validate-data/package.json b/script/validate-data/package.json new file mode 100644 index 0000000..a2b867d --- /dev/null +++ b/script/validate-data/package.json @@ -0,0 +1,21 @@ +{ + "name": "validate-data", + "version": "1.0.0", + "main": "index.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "github/c2c-actions-experience", + "license": "MIT", + "devDependencies": { + "@types/js-yaml": "^3.12.4", + "@types/node": "^14.0.1", + "ts-node": "^8.10.1", + "typescript": "^3.9.2" + }, + "dependencies": { + "@actions/core": "^1.2.4", + "js-yaml": "^3.13.1", + "jsonschema": "^1.2.6" + } +} \ No newline at end of file diff --git a/script/validate-data/settings.json b/script/validate-data/settings.json new file mode 100644 index 0000000..1913e2f --- /dev/null +++ b/script/validate-data/settings.json @@ -0,0 +1,6 @@ +{ + "folders": [ + "../../ci", + "../../automation" + ] +} \ No newline at end of file diff --git a/script/validate-data/tsconfig.json b/script/validate-data/tsconfig.json new file mode 100644 index 0000000..7c50a20 --- /dev/null +++ b/script/validate-data/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + }, + "include": ["*.ts"] +} \ No newline at end of file From 3dd92068cf9c54c6abf3c6ca67ce9e522020cad6 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 19 May 2020 09:59:46 -0700 Subject: [PATCH 25/63] Add missing icons --- icons/aws.svg | 1 + icons/azure.svg | 1 + icons/googlegke.svg | 1 + 3 files changed, 3 insertions(+) create mode 100644 icons/aws.svg create mode 100644 icons/azure.svg create mode 100644 icons/googlegke.svg diff --git a/icons/aws.svg b/icons/aws.svg new file mode 100644 index 0000000..59ff870 --- /dev/null +++ b/icons/aws.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/azure.svg b/icons/azure.svg new file mode 100644 index 0000000..2ff63c1 --- /dev/null +++ b/icons/azure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/googlegke.svg b/icons/googlegke.svg new file mode 100644 index 0000000..68ecb39 --- /dev/null +++ b/icons/googlegke.svg @@ -0,0 +1 @@ +image/svg+xml \ No newline at end of file From 1bb722865287973f4e166189d67c1f20009c3854 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 19 May 2020 10:04:07 -0700 Subject: [PATCH 26/63] Report success as well for visibility --- script/validate-data/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 0809372..dbea113 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -3,7 +3,7 @@ import { promises as fs } from "fs"; import { safeLoad } from "js-yaml"; import { basename, extname, join } from "path"; import { Validator as validator } from "jsonschema"; -import { endGroup, error, setFailed, startGroup } from '@actions/core'; +import { endGroup, error, info, setFailed, startGroup } from '@actions/core'; interface WorkflowWithErrors { id: string; @@ -102,12 +102,14 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom ) if (erroredWorkflows.length > 0) { - startGroup(`Found ${erroredWorkflows.length} workflows with errors:`); + startGroup(`😟 - Found ${erroredWorkflows.length} workflows with errors:`); erroredWorkflows.forEach(erroredWorkflow => { error(`Errors in ${erroredWorkflow.id} - ${erroredWorkflow.errors.map(e => e.toString()).join(", ")}`) }) endGroup(); setFailed(`Found ${erroredWorkflows.length} workflows with errors`); + } else { + info("🎉🤘 - Found no workflows with errors!") } } catch (e) { error(`Unhandled error while syncing workflows: ${e}`); From 74c1e87c6bb06c34c54405dda1276eadbabc8a81 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Wed, 20 May 2020 16:31:20 -0700 Subject: [PATCH 27/63] =?UTF-8?q?Don=E2=80=99t=20fail=20if=20no=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sync_ghes.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_ghes.yaml b/.github/workflows/sync_ghes.yaml index 397c173..54193bd 100644 --- a/.github/workflows/sync_ghes.yaml +++ b/.github/workflows/sync_ghes.yaml @@ -24,5 +24,9 @@ jobs: working-directory: ./script/sync-ghes - run: | git add -A - git commit -m "Updating GHES workflows" + if [ -z "$(git status --porcelain)" ]; then + echo "No changes to commit" + else + git commit -m "Updating GHES workflows" + fi - run: git push From 9a0a11423d295d10201f83018c7cbfc38eca2b75 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Wed, 20 May 2020 16:31:33 -0700 Subject: [PATCH 28/63] Name the workflow --- .github/workflows/validate-data.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate-data.yaml b/.github/workflows/validate-data.yaml index 3abd612..d923d73 100644 --- a/.github/workflows/validate-data.yaml +++ b/.github/workflows/validate-data.yaml @@ -1,3 +1,5 @@ +name: Validate Data + on: push: pull_request: From 15c78f880211e02929edf5ff0d59c225e9f11c69 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 21 May 2020 11:09:51 -0700 Subject: [PATCH 29/63] Do not sync workflows without categories to GHES --- script/sync-ghes/index.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index 5390664..78a0dda 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -11,6 +11,16 @@ interface WorkflowDesc { iconType?: "svg" | "octicon"; } +interface WorkflowProperties { + name: string; + + description: string; + + iconName?: string; + + categories: string[] | null; +} + interface WorkflowsCheckResult { compatibleWorkflows: WorkflowDesc[]; incompatibleWorkflows: WorkflowDesc[]; @@ -33,15 +43,18 @@ async function checkWorkflows( for (const e of dir) { if (e.isFile()) { const workflowFilePath = join(folder, e.name); - const enabled = await checkWorkflow(workflowFilePath, enabledActions); - const workflowId = basename(e.name, extname(e.name)); - const workflowProperties = require(join( + const workflowProperties: WorkflowProperties = require(join( folder, "properties", `${workflowId}.properties.json` )); const iconName: string | undefined = workflowProperties["iconName"]; + const partnerWorkflow = workflowProperties.categories === null; + + const enabled = + !partnerWorkflow && + (await checkWorkflow(workflowFilePath, enabledActions)); const workflowDesc: WorkflowDesc = { folder, From ec3fe32d4355d58639c819a074ac7266c5b5821c Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Thu, 21 May 2020 16:32:47 -0400 Subject: [PATCH 30/63] Define OTP/Elixir versions as strings As now [recommended](https://github.com/actions/setup-elixir/tree/2071beb570a53fb599fbd638d0a4f4577d57143d#usage) in the action's README, the configuration versions should be strings so that YAML parsing doesn't truncate something like `23.0` to `23`, which isn't equivalent. --- ci/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 4de7dcb..ac918c8 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -16,8 +16,8 @@ jobs: - name: Setup elixir uses: actions/setup-elixir@v1 with: - elixir-version: 1.9.4 # Define the elixir version [required] - otp-version: 22.2 # Define the OTP version [required] + elixir-version: '1.9.4' # Define the elixir version [required] + otp-version: '22.2' # Define the OTP version [required] - name: Install Dependencies run: mix deps.get - name: Run Tests From 249441a642d6772b4531e1994d8056f9828953ae Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Thu, 21 May 2020 13:55:36 -0700 Subject: [PATCH 31/63] Update job name --- .github/workflows/validate-data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-data.yaml b/.github/workflows/validate-data.yaml index d923d73..20eee71 100644 --- a/.github/workflows/validate-data.yaml +++ b/.github/workflows/validate-data.yaml @@ -5,7 +5,7 @@ on: pull_request: jobs: - sync: + validate-data: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 0ac09546734a9b5eac78e60ccda8dae05f1c7d79 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Thu, 21 May 2020 17:33:37 -0400 Subject: [PATCH 32/63] Remove WindowsForms --- ci/properties/dotnet-core-desktop.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/dotnet-core-desktop.properties.json b/ci/properties/dotnet-core-desktop.properties.json index 0299220..9b2aa35 100644 --- a/ci/properties/dotnet-core-desktop.properties.json +++ b/ci/properties/dotnet-core-desktop.properties.json @@ -2,5 +2,5 @@ "name": ".NET Core Desktop", "description": "Build, test, sign and publish a desktop application built on .NET Core.", "iconName": "dotnetcore", - "categories": ["C#", "Visual Basic", "WPF", ".NET", "WindowsForms"] + "categories": ["C#", "Visual Basic", "WPF", ".NET"] } \ No newline at end of file From de4411e09783092951dd168aa2651c251f4eb765 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 21 May 2020 14:34:40 -0700 Subject: [PATCH 33/63] Ensure "blank" template is available --- script/sync-ghes/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index 78a0dda..ea347cf 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -50,10 +50,12 @@ async function checkWorkflows( `${workflowId}.properties.json` )); const iconName: string | undefined = workflowProperties["iconName"]; + + const isBlankTemplate = workflowId === "blank"; const partnerWorkflow = workflowProperties.categories === null; const enabled = - !partnerWorkflow && + (isBlankTemplate || !partnerWorkflow) && (await checkWorkflow(workflowFilePath, enabledActions)); const workflowDesc: WorkflowDesc = { From 15d943af34246de3d046937a16740283b10808aa Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Sun, 24 May 2020 08:21:13 +0300 Subject: [PATCH 34/63] Rust: Enable cargo colors for prettier output --- ci/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/rust.yml b/ci/rust.yml index 6738b0b..3c13d1b 100644 --- a/ci/rust.yml +++ b/ci/rust.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ master ] +env: + CARGO_TERM_COLOR: always + jobs: build: From 9d886e00f9a7aac1aba11fb202443f729fff1608 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Mon, 25 May 2020 12:55:49 -0700 Subject: [PATCH 35/63] Create main.yml --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c6f2aa4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +name: Close as a support issue +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, 'support') + with: + comment: | + Sorry, but we'd like to keep issues related to code in this repository. Thank you 🙇 + + If you have questions about writing workflows or action files, then please [visit the GitHub Community Forum's Actions Board](https://github.community/t5/GitHub-Actions/bd-p/actions) + + If you are having an issue or question about GitHub Actions then please [contact customer support](https://help.github.com/en/articles/about-github-actions#contacting-support) From 861a79590c288877feeda13b1d1488b7e6ef6598 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Mon, 25 May 2020 12:57:07 -0700 Subject: [PATCH 36/63] Rename main.yml to label-close.yml --- .github/workflows/{main.yml => label-close.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => label-close.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/label-close.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/label-close.yml From 0195d47eeee40e548abf6020ec3562883d2cfef9 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Mon, 25 May 2020 13:09:29 -0700 Subject: [PATCH 37/63] Update pull_request_template.md --- .github/pull_request_template.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 35bfb44..d1b6bfb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,17 @@ -Thank you for sending in this pull request. Please make sure you take a look at the [contributing file](https://github.com/actions/starter-workflows/blob/master/CONTRIBUTING.md). Here's a few things for you to consider in this pull request: +This repository contains configuration for what users see when they click on the `Actions` tab. -- [ ] Include a good description of the workflow. -- [ ] Links to the language or tool will be nice (unless its really obvious) +It is not: +* A playground to try out scripts +* A place for you to create a workflow for your repository + +-- + +Thank you for sending in this pull request. Please make sure you take a look at the [contributing file](https://github.com/actions/starter-workflows/blob/master/CONTRIBUTING.md). Here's a few things for you to consider in this pull request. + +Please **add to this description** at the bottom :point_down: + +- [ ] A good description of the workflow at the bottom of this page. +- [ ] Some links to the language or tool will be nice (unless its really obvious) In the workflow and properties files: @@ -13,14 +23,12 @@ In the workflow and properties files: - [ ] The name of CI workflows should only be the name of the language or platform: for example "Go" (not "Go CI" or "Go Build") - [ ] Include comments in the workflow for any parts that are not obvious or could use clarification. - [ ] CI workflows should run on `push` to `branches: [ master ]` and `pull_request` to `branches: [ master ]`. - - Packaging workflows should run on `release` with `types: [ created ]`. +- [ ] Packaging workflows should run on `release` with `types: [ created ]`. 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). 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 uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by From 54a75270fc62e6f05c6b2facca5f958ea353ac69 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Mon, 25 May 2020 13:10:00 -0700 Subject: [PATCH 38/63] Update pull_request_template.md --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d1b6bfb..01bb7bc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ It is not: * A playground to try out scripts * A place for you to create a workflow for your repository --- +--- Thank you for sending in this pull request. Please make sure you take a look at the [contributing file](https://github.com/actions/starter-workflows/blob/master/CONTRIBUTING.md). Here's a few things for you to consider in this pull request. From 297af984baad4e4cbb4c37b2013136a7ac86a1e8 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Wed, 27 May 2020 10:49:51 -0400 Subject: [PATCH 39/63] Update ci/php.yml --- ci/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/php.yml b/ci/php.yml index 4ac898c..3bd2895 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -15,7 +15,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: vendor key: ${{ runner.os }}-node-${{ hashFiles('**/composer.lock') }} From b7eff1ebe987c0bccfeff009931ba608c8419f0c Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 2 Jun 2020 13:40:33 -0700 Subject: [PATCH 40/63] Add creator to partner workflows --- ci/properties/aws.properties.json | 1 + ci/properties/azure.properties.json | 1 + ci/properties/google.properties.json | 1 + ci/properties/ibm.properties.json | 3 ++- ci/properties/tencent.properties.json | 3 ++- ci/properties/terraform.properties.json | 3 ++- 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ci/properties/aws.properties.json b/ci/properties/aws.properties.json index 2988e7c..b80775f 100644 --- a/ci/properties/aws.properties.json +++ b/ci/properties/aws.properties.json @@ -1,6 +1,7 @@ { "name": "Deploy to Amazon ECS", "description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.", + "creator": "Amazon Web Services", "iconName": "aws", "categories": null } \ No newline at end of file diff --git a/ci/properties/azure.properties.json b/ci/properties/azure.properties.json index ba92f6f..fd9d0d8 100644 --- a/ci/properties/azure.properties.json +++ b/ci/properties/azure.properties.json @@ -1,6 +1,7 @@ { "name": "Deploy Node.js to Azure Web App", "description": "Build a Node.js project and deploy it to an Azure Web App.", + "creator": "Microsoft Azure", "iconName": "azure", "categories": null } \ No newline at end of file diff --git a/ci/properties/google.properties.json b/ci/properties/google.properties.json index dee44b9..e2d917d 100644 --- a/ci/properties/google.properties.json +++ b/ci/properties/google.properties.json @@ -1,6 +1,7 @@ { "name": "Build and Deploy to GKE", "description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.", + "creator": "Google Cloud", "iconName": "googlegke", "categories": null } \ No newline at end of file diff --git a/ci/properties/ibm.properties.json b/ci/properties/ibm.properties.json index 25ebf8a..cfd0383 100644 --- a/ci/properties/ibm.properties.json +++ b/ci/properties/ibm.properties.json @@ -1,6 +1,7 @@ { "name": "Deploy to IBM Cloud Kubernetes Service", "description": "Build a docker container, publish it to IBM Cloud Container Registry, and deploy to IBM Cloud Kubernetes Service.", + "creator": "IBM", "iconName": "ibm", "categories": null -} +} \ No newline at end of file diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json index b3d9d3f..ba579a1 100644 --- a/ci/properties/tencent.properties.json +++ b/ci/properties/tencent.properties.json @@ -1,6 +1,7 @@ { "name": "Tencent Kubernetes Engine", "description": "This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE).", + "creator": "Tencent Cloud", "iconName": "tencentcloud", "categories": null -} +} \ No newline at end of file diff --git a/ci/properties/terraform.properties.json b/ci/properties/terraform.properties.json index 34fa16e..445604c 100644 --- a/ci/properties/terraform.properties.json +++ b/ci/properties/terraform.properties.json @@ -1,6 +1,7 @@ { "name": "Terraform", "description": "Set up Terraform CLI in your GitHub Actions workflow.", + "creator": "Hashicorp", "iconName": "terraform", "categories": null -} +} \ No newline at end of file From ef82cf1b1aed434e4127efeef25c9bf6446fed14 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 2 Jun 2020 13:40:45 -0700 Subject: [PATCH 41/63] Add creator to validation schema --- script/validate-data/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index dbea113..81048f8 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -22,6 +22,7 @@ const propertiesSchema = { properties: { name: { type: "string", required: true }, description: { type: "string", required: true }, + creator: { type: "string", required: false }, iconName: { type: "string", required: true }, categories: { anyOf: [ From 4ad3f706665fa8887ae6d2882a626db17e75c412 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 2 Jun 2020 21:57:58 -0700 Subject: [PATCH 42/63] Fix creator name Co-authored-by: Christopher Schleiden --- ci/properties/terraform.properties.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/terraform.properties.json b/ci/properties/terraform.properties.json index 445604c..bfeabdf 100644 --- a/ci/properties/terraform.properties.json +++ b/ci/properties/terraform.properties.json @@ -1,7 +1,7 @@ { "name": "Terraform", "description": "Set up Terraform CLI in your GitHub Actions workflow.", - "creator": "Hashicorp", + "creator": "HashiCorp", "iconName": "terraform", "categories": null -} \ No newline at end of file +} From b4362decc974f2a7acd2bb15fcafafb1cf0c710f Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Mon, 8 Jun 2020 08:30:24 -0700 Subject: [PATCH 43/63] Change the cron for stale Let's move the recommended stale cron tab away from 00:00 UTC --- automation/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/stale.yml b/automation/stale.yml index 7bbc050..3404517 100644 --- a/automation/stale.yml +++ b/automation/stale.yml @@ -2,7 +2,7 @@ name: Mark stale issues and pull requests on: schedule: - - cron: "0 0 * * *" + - cron: "30 1 * * *" jobs: stale: From 330ca7d1bd662fbaf64ad4b9e7c9ea62eaf79aee Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Tue, 16 Jun 2020 18:44:47 -0400 Subject: [PATCH 44/63] Update php cache key to use php in its name Signed-off-by: Matthew Peveler --- ci/php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/php.yml b/ci/php.yml index ebb41ae..839187e 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -22,9 +22,9 @@ jobs: uses: actions/cache@v2 with: path: vendor - key: ${{ runner.os }}-node-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-node- + ${{ runner.os }}-php- - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' From f1fa7ed3284f8a2c6a2b21f94eb44a6591379cb4 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Mon, 29 Jun 2020 11:44:45 -0400 Subject: [PATCH 45/63] Improve name of "Setup elixir" step in Elixir workflow --- ci/elixir.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index ac918c8..e15ba68 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup elixir + - name: Set up Elixir uses: actions/setup-elixir@v1 with: elixir-version: '1.9.4' # Define the elixir version [required] From e4f46dac7691bda5e84c41bee4f62a261c6e5d6e Mon Sep 17 00:00:00 2001 From: Henrik Nyh Date: Mon, 29 Jun 2020 17:13:20 +0100 Subject: [PATCH 46/63] elixir.yml: More consistent case When running this action, it will show steps like "Set up job", "Initialize containers" and "Complete job", which are not in Title Case. Nor is "Set up Elixir". (Some steps like "Post Restore cache" are some sort of half-Title Case, but they seem to be in the minority.) --- ci/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index e15ba68..b781272 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -18,7 +18,7 @@ jobs: with: elixir-version: '1.9.4' # Define the elixir version [required] otp-version: '22.2' # Define the OTP version [required] - - name: Install Dependencies + - name: Install dependencies run: mix deps.get - - name: Run Tests + - name: Run tests run: mix test From 0159b6df788d4b675ea89d2ebda5935972ea6153 Mon Sep 17 00:00:00 2001 From: Henrik Nyh Date: Mon, 29 Jun 2020 17:20:56 +0100 Subject: [PATCH 47/63] elixir.yml: Specify latest Elixir/OTP versions There is an OTP 23.0 but 22.3 is the max that latest Elixir supports currently. --- ci/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index e15ba68..e834752 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -16,8 +16,8 @@ jobs: - name: Set up Elixir uses: actions/setup-elixir@v1 with: - elixir-version: '1.9.4' # Define the elixir version [required] - otp-version: '22.2' # Define the OTP version [required] + elixir-version: '1.10.3' # Define the elixir version [required] + otp-version: '22.3' # Define the OTP version [required] - name: Install Dependencies run: mix deps.get - name: Run Tests From dabe11f6f76a121ca74dc266524906e560959f06 Mon Sep 17 00:00:00 2001 From: Kenji Koshikawa Date: Thu, 2 Jul 2020 00:39:20 +0900 Subject: [PATCH 48/63] refs #573 Update deprecated for actions/setup-ruby to on gem-push.yml --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 08733c7..5f5f026 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: - version: 2.6.x + ruby-version: 2.6.x - name: Publish to GPR run: | From b4f1aae32fa4651fa82e7fe1d22187db4975ab97 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 1 Jul 2020 14:09:21 -0400 Subject: [PATCH 49/63] Use sentence casing --- ci/elixir.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 643e1b6..ca562ca 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -12,24 +12,24 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Cache Mix Dependencies + - name: Cache mix dependencies uses: actions/cache@v1 with: path: deps key: ${{ runner.OS }}-mix-${{ hashFiles('**/mix.lock') }} restore-keys: | ${{ runner.OS }}-mix- - - name: Install Dependencies + - name: Install dependencies run: | mix local.rebar --force mix local.hex --force mix deps.get - - name: Cache Build Files + - name: Cache build files uses: actions/cache@v1 with: path: _build key: ${{ runner.OS }}-build-${{ github.sha }} restore-keys: | ${{ runner.OS }}-build- - - name: Run Tests + - name: Run tests run: mix test From cb6cee5157deeeb3f3b554c900f5efd0d5b887ae Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 1 Jul 2020 14:14:45 -0400 Subject: [PATCH 50/63] Update elixir.yml --- ci/elixir.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 7b3d5a4..1cad8fe 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -13,6 +13,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Elixir + uses: actions/setup-elixir@v1 + with: + elixir-version: '1.10.3' # Define the elixir version [required] + otp-version: '22.3' # Define the OTP version [required] - name: Cache mix dependencies uses: actions/cache@v1 with: @@ -30,4 +35,4 @@ jobs: - name: Install dependencies run: mix deps.get - name: Run tests - run: mix test \ No newline at end of file + run: mix test From 9995e35e759c66813fdcbb5aaaea5a2a49e04f56 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 1 Jul 2020 17:06:09 -0400 Subject: [PATCH 51/63] Cache only Elixir dependencies, not build --- ci/elixir.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 1cad8fe..4b3e78f 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -9,6 +9,7 @@ on: jobs: build: + name: Build and test runs-on: ubuntu-latest steps: @@ -18,20 +19,12 @@ jobs: with: elixir-version: '1.10.3' # Define the elixir version [required] otp-version: '22.3' # Define the OTP version [required] - - name: Cache mix dependencies - uses: actions/cache@v1 + - name: Restore dependencies cache + uses: actions/cache@v2 with: path: deps - key: ${{ runner.OS }}-mix-${{ hashFiles('**/mix.lock') }} - restore-keys: | - ${{ runner.OS }}-mix- - - name: Cache build files - uses: actions/cache@v1 - with: - path: _build - key: ${{ runner.OS }}-build-${{ github.sha }} - restore-keys: | - ${{ runner.OS }}-build- + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- - name: Install dependencies run: mix deps.get - name: Run tests From b79be1ea1a0e060ce090e4fc4206ab660ae0e6ad Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Tue, 7 Jul 2020 14:07:47 -0700 Subject: [PATCH 52/63] Add manually triggered workflow template --- ci/manual.yml | 30 ++++++++++++++++++++++++++++ ci/properties/manual.properties.json | 6 ++++++ 2 files changed, 36 insertions(+) create mode 100644 ci/manual.yml create mode 100644 ci/properties/manual.properties.json diff --git a/ci/manual.yml b/ci/manual.yml new file mode 100644 index 0000000..4a7131e --- /dev/null +++ b/ci/manual.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Person to greet' + # Default value if no value is explicitly provided + default: 'World' + # Input has to be provided for the workflow to run + required: true + +# 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 "greet" + greet: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send greeting + run: echo "Hello ${{ github.event.inputs.name }}" \ No newline at end of file diff --git a/ci/properties/manual.properties.json b/ci/properties/manual.properties.json new file mode 100644 index 0000000..7a7d96f --- /dev/null +++ b/ci/properties/manual.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Manual workflow", + "description": "Simple workflow that is manually triggered.", + "iconName": "blank", + "categories": null +} From d84eed709f45f0278c3dd3a5e73bf06d243eaf61 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 9 Jul 2020 08:32:58 -0700 Subject: [PATCH 53/63] Move manual workflow template to automation category --- {ci => automation}/manual.yml | 0 {ci => automation}/properties/manual.properties.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {ci => automation}/manual.yml (100%) rename {ci => automation}/properties/manual.properties.json (79%) diff --git a/ci/manual.yml b/automation/manual.yml similarity index 100% rename from ci/manual.yml rename to automation/manual.yml diff --git a/ci/properties/manual.properties.json b/automation/properties/manual.properties.json similarity index 79% rename from ci/properties/manual.properties.json rename to automation/properties/manual.properties.json index 7a7d96f..f08cbc3 100644 --- a/ci/properties/manual.properties.json +++ b/automation/properties/manual.properties.json @@ -2,5 +2,5 @@ "name": "Manual workflow", "description": "Simple workflow that is manually triggered.", "iconName": "blank", - "categories": null + "categories": ["Automation"] } From 15e1039f3fe5847254a31771e973e73c73968eed Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 10:55:13 +0100 Subject: [PATCH 54/63] Include Bearer in GEM_HOST_API_KEY --- ci/gem-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 08733c7..25477c8 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -27,7 +27,7 @@ jobs: gem build *.gemspec gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: - GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}} + GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" OWNER: username - name: Publish to RubyGems @@ -39,4 +39,4 @@ jobs: gem build *.gemspec gem push *.gem env: - GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} + GEM_HOST_API_KEY: "Bearer ${{secrets.RUBYGEMS_AUTH_TOKEN}}" From 9e8735b0e6649465a5d3b699d544dc379120d797 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 11:12:02 +0100 Subject: [PATCH 55/63] Use ${{ github.repository_owner }} as OWNER --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 25477c8..21a0115 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -28,7 +28,7 @@ jobs: gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" - OWNER: username + OWNER: ${{ github.repository_owner }} - name: Publish to RubyGems run: | From 0ca3f2a990f9f73a0df51f686dd470fe36e5047f Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 11:15:29 +0100 Subject: [PATCH 56/63] Remove Bearer from printf .gem/credentials --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 21a0115..3f2ad50 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -23,7 +23,7 @@ jobs: mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials - printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials gem build *.gemspec gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: From bd169be472f61378e09e0c372c2fa3b1789b3d1a Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 11:25:05 +0100 Subject: [PATCH 57/63] Use ruby-version instead of version This fixes warning: Input 'version' has been deprecated with message: The version property will not be supported after October 1, 2019. Use ruby-version instead --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 3f2ad50..cc92e97 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: - version: 2.6.x + ruby-version: 2.6.x - name: Publish to GPR run: | From abf7f258d1d84c79ad067c704e069c8cf7d8d2d0 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Mon, 13 Jul 2020 12:12:41 -0700 Subject: [PATCH 58/63] Use $default-branch token --- ci/android.yml | 4 ++-- ci/ant.yml | 4 ++-- ci/blank.yml | 6 +++--- ci/c-cpp.yml | 4 ++-- ci/clojure.yml | 4 ++-- ci/crystal.yml | 4 ++-- ci/dart.yml | 4 ++-- ci/django.yml | 4 ++-- ci/docker-image.yml | 4 ++-- ci/docker-publish.yml | 8 ++++---- ci/dotnet-core-desktop.yml | 16 ++++++++-------- ci/dotnet-core.yml | 4 ++-- ci/elixir.yml | 6 +++--- ci/erlang.yml | 4 ++-- ci/gem-push.yml | 4 ++-- ci/go.yml | 4 ++-- ci/gradle.yml | 4 ++-- ci/haskell.yml | 4 ++-- ci/jekyll.yml | 4 ++-- ci/laravel.yml | 6 +++--- ci/maven.yml | 4 ++-- ci/node.js.yml | 4 ++-- ci/php.yml | 6 +++--- ci/python-app.yml | 4 ++-- ci/python-package.yml | 4 ++-- ci/ruby.yml | 4 ++-- ci/rust.yml | 4 ++-- ci/scala.yml | 4 ++-- ci/swift.yml | 4 ++-- ci/terraform.yml | 12 ++++++------ 30 files changed, 76 insertions(+), 76 deletions(-) diff --git a/ci/android.yml b/ci/android.yml index 7ec0147..c88c515 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -2,9 +2,9 @@ name: Android CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/ant.yml b/ci/ant.yml index efebba5..28fe6d0 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -5,9 +5,9 @@ name: Java CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/blank.yml b/ci/blank.yml index d6783e2..72f1f16 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -3,12 +3,12 @@ name: CI # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +# events but only for the $default-branch branch on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: diff --git a/ci/c-cpp.yml b/ci/c-cpp.yml index e323326..88d1497 100644 --- a/ci/c-cpp.yml +++ b/ci/c-cpp.yml @@ -2,9 +2,9 @@ name: C/C++ CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/clojure.yml b/ci/clojure.yml index 22bfe20..098918a 100644 --- a/ci/clojure.yml +++ b/ci/clojure.yml @@ -2,9 +2,9 @@ name: Clojure CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/crystal.yml b/ci/crystal.yml index ce9dbfc..6552afa 100644 --- a/ci/crystal.yml +++ b/ci/crystal.yml @@ -2,9 +2,9 @@ name: Crystal CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/dart.yml b/ci/dart.yml index 11e18c7..6e1b2e3 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -2,9 +2,9 @@ name: Dart CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/django.yml b/ci/django.yml index c806047..b9d5315 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -2,9 +2,9 @@ name: Django CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/docker-image.yml b/ci/docker-image.yml index e57d42a..78532a3 100644 --- a/ci/docker-image.yml +++ b/ci/docker-image.yml @@ -2,9 +2,9 @@ name: Docker Image CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index 9e80e76..76756db 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -2,9 +2,9 @@ name: Docker on: push: - # Publish `master` as Docker `latest` image. + # Publish `$default-branch` as Docker `latest` image. branches: - - master + - $default-branch # Publish `v1.2.3` tags as releases. tags: @@ -56,7 +56,7 @@ jobs: - name: Push image run: | 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]') @@ -67,7 +67,7 @@ jobs: [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest + [ "$VERSION" == "$default-branch" ] && VERSION=latest echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION diff --git a/ci/dotnet-core-desktop.yml b/ci/dotnet-core-desktop.yml index ed37b70..341576c 100644 --- a/ci/dotnet-core-desktop.yml +++ b/ci/dotnet-core-desktop.yml @@ -11,22 +11,22 @@ # To configure this workflow: # # 1. Configure environment variables -# GitHub sets default environment variables for every workflow run. +# GitHub sets default environment variables for every workflow run. # Replace the variables relative to your project in the "env" section below. -# +# # 2. Signing -# Generate a signing certificate in the Windows Application +# Generate a signing certificate in the Windows Application # Packaging Project or add an existing signing certificate to the project. # Next, use PowerShell to encode the .pfx file using Base64 encoding # by running the following Powershell script to generate the output string: -# +# # $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte # [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' # # Open the output file, SigningCertificate_Encoded.txt, and copy the # string inside. Then, add the string to the repo as a GitHub secret # and name it "Base64_Encoded_Pfx." -# For more information on how to configure your signing certificate for +# For more information on how to configure your signing certificate for # this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing # # Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". @@ -40,9 +40,9 @@ name: .NET Core Desktop on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: @@ -52,7 +52,7 @@ jobs: matrix: configuration: [Debug, Release] - runs-on: windows-latest # For a list of available runner types, refer to + runs-on: windows-latest # For a list of available runner types, refer to # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on env: diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index f734ea7..03958b6 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -2,9 +2,9 @@ name: .NET Core on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/elixir.yml b/ci/elixir.yml index 4b3e78f..76dd26d 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -2,10 +2,10 @@ name: Elixir CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] - + branches: [ $default-branch ] + jobs: build: diff --git a/ci/erlang.yml b/ci/erlang.yml index fd28497..25cb893 100644 --- a/ci/erlang.yml +++ b/ci/erlang.yml @@ -2,9 +2,9 @@ name: Erlang CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 08733c7..f9b64e8 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -2,9 +2,9 @@ name: Ruby Gem on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/go.yml b/ci/go.yml index d31e87f..3fa9348 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: diff --git a/ci/gradle.yml b/ci/gradle.yml index 58e1c59..4550f58 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -5,9 +5,9 @@ name: Java CI with Gradle on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/haskell.yml b/ci/haskell.yml index 4bc2d16..4c9a50c 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -2,9 +2,9 @@ name: Haskell CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/jekyll.yml b/ci/jekyll.yml index 64df081..9449a6e 100644 --- a/ci/jekyll.yml +++ b/ci/jekyll.yml @@ -2,9 +2,9 @@ name: Jekyll site CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/laravel.yml b/ci/laravel.yml index a895246..b32ad88 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -2,15 +2,15 @@ name: Laravel on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: laravel-tests: runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v2 - name: Copy .env diff --git a/ci/maven.yml b/ci/maven.yml index c8aeb3a..a46556a 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -5,9 +5,9 @@ name: Java CI with Maven on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/node.js.yml b/ci/node.js.yml index 673bd33..ce0cdcf 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/php.yml b/ci/php.yml index 839187e..5053b43 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -2,9 +2,9 @@ name: PHP Composer on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: @@ -16,7 +16,7 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate - + - name: Cache Composer packages id: composer-cache uses: actions/cache@v2 diff --git a/ci/python-app.yml b/ci/python-app.yml index c7f5067..3b3e6a6 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -5,9 +5,9 @@ name: Python application on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/python-package.yml b/ci/python-package.yml index f1abc2f..c4a1081 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -5,9 +5,9 @@ name: Python package on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/ruby.yml b/ci/ruby.yml index 76c166e..7f3bdd6 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -9,9 +9,9 @@ name: Ruby on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: test: diff --git a/ci/rust.yml b/ci/rust.yml index 3c13d1b..6c82c61 100644 --- a/ci/rust.yml +++ b/ci/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] env: CARGO_TERM_COLOR: always diff --git a/ci/scala.yml b/ci/scala.yml index f182d0c..96bfc70 100644 --- a/ci/scala.yml +++ b/ci/scala.yml @@ -2,9 +2,9 @@ name: Scala CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/swift.yml b/ci/swift.yml index 5dbdb4f..df062b5 100644 --- a/ci/swift.yml +++ b/ci/swift.yml @@ -2,9 +2,9 @@ name: Swift on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/terraform.yml b/ci/terraform.yml index 148f2e2..7fc401b 100644 --- a/ci/terraform.yml +++ b/ci/terraform.yml @@ -1,7 +1,7 @@ # This workflow installs the latest version of Terraform CLI and configures the Terraform CLI configuration file # with an API token for Terraform Cloud (app.terraform.io). On pull request events, this workflow will run # `terraform init`, `terraform fmt`, and `terraform plan` (speculative plan via Terraform Cloud). On push events -# to the master branch, `terraform apply` will be executed. +# to the $default-branch branch, `terraform apply` will be executed. # # Documentation for `hashicorp/setup-terraform` is located here: https://github.com/hashicorp/setup-terraform # @@ -47,7 +47,7 @@ name: 'Terraform' on: push: branches: - - master + - $default-branch pull_request: jobs: @@ -65,7 +65,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - # Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token + # Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token - name: Setup Terraform uses: hashicorp/setup-terraform@v1 with: @@ -82,9 +82,9 @@ jobs: # Generates an execution plan for Terraform - name: Terraform Plan run: terraform plan - - # On push to master, build or change infrastructure according to Terraform configuration files + + # On push to $default-branch, build or change infrastructure according to Terraform configuration files # Note: It is recommended to set up a required "strict" status check in your repository for "Terraform Cloud". See the documentation on "strict" required status checks for more information: https://help.github.com/en/github/administering-a-repository/types-of-required-status-checks - name: Terraform Apply - if: github.ref == 'refs/heads/master' && github.event_name == 'push' + if: github.ref == 'refs/heads/$default-branch' && github.event_name == 'push' run: terraform apply -auto-approve From 7ed78293f73a2b40e29a46a4b3be386c8c534b6b Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Mon, 13 Jul 2020 12:13:03 -0700 Subject: [PATCH 59/63] Use repository link --- automation/label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/label.yml b/automation/label.yml index e90b599..7c724a6 100644 --- a/automation/label.yml +++ b/automation/label.yml @@ -3,7 +3,7 @@ # # To use this workflow, you will need to set up a .github/labeler.yml # file with configuration. For more information, see: -# https://github.com/actions/labeler/blob/master/README.md +# https://github.com/actions/labeler name: Labeler on: [pull_request] From 930a2cac2bfea6c9d44813a374348d81b7b410fd Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Tue, 14 Jul 2020 12:57:43 -0700 Subject: [PATCH 60/63] Update PR template to refer to $default-branch --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 01bb7bc..530b19d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -22,7 +22,7 @@ In the workflow and properties files: - [ ] Use sentence case for the names of workflows and steps, for example "Run tests". - [ ] The name of CI workflows should only be the name of the language or platform: for example "Go" (not "Go CI" or "Go Build") - [ ] Include comments in the workflow for any parts that are not obvious or could use clarification. -- [ ] CI workflows should run on `push` to `branches: [ master ]` and `pull_request` to `branches: [ master ]`. +- [ ] 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 ]`. Some general notes: From 2740936be443d46a9dc0907df6103ab070156d18 Mon Sep 17 00:00:00 2001 From: Rob McGuire Date: Fri, 17 Jul 2020 19:54:48 -0700 Subject: [PATCH 61/63] Move "checkout" comment adjacent to its step --- ci/terraform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terraform.yml b/ci/terraform.yml index 7fc401b..e6cf027 100644 --- a/ci/terraform.yml +++ b/ci/terraform.yml @@ -60,8 +60,8 @@ jobs: run: shell: bash - # Checkout the repository to the GitHub Actions runner steps: + # Checkout the repository to the GitHub Actions runner - name: Checkout uses: actions/checkout@v2 From fae2392dd2801d3741150afe43ac3df1bb5d57dc Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Fri, 21 Aug 2020 09:24:31 -0400 Subject: [PATCH 62/63] Update ci/r.yml Co-authored-by: Andy McKay --- ci/r.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/r.yml b/ci/r.yml index cad232b..efc6587 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -10,9 +10,9 @@ name: R on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: From dc7a645261e96af0083db1398c7e0b912d1c6688 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Fri, 21 Aug 2020 08:25:55 -0700 Subject: [PATCH 63/63] Update ci/properties/r.properties.json --- ci/properties/r.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json index a9c6c61..84ba0ec 100644 --- a/ci/properties/r.properties.json +++ b/ci/properties/r.properties.json @@ -1,6 +1,6 @@ { "name": "R package", "description": "Create and test an R package on multiple R versions.", - "iconName": "R", + "iconName": "r", "categories": ["R"] }