From f1662044f7799fcef569623eccffa8a4ea67ba4b Mon Sep 17 00:00:00 2001 From: Christer Edvartsen Date: Thu, 14 Nov 2019 15:24:32 +0100 Subject: [PATCH 001/118] 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 7b17fb7a4b192c3b86d74d0a9a863ebb08cdcad3 Mon Sep 17 00:00:00 2001 From: sclaire-1 <54961957+sclaire-1@users.noreply.github.com> Date: Sun, 17 Nov 2019 16:44:11 -0800 Subject: [PATCH 002/118] Edit CONTRIBUTING.md The sentence introducing the requirements before merging has been edited to improve flow --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8041138..89095bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Contributions to this project are [released](https://help.github.com/articles/gi Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. -There are few requirements for adding in a new workflow, which we'll need to review before we merge: +Before merging a new workflow, the following requirements need to be met: - Should be as simple as is needed for the service. - There are many programming languages and tools out there. Right now we don't have a page that allows for a really large number of workflows, so we do have to be a little choosy about what we accept. Less popular tools or languages might not be accepted. From 611aeebdf7841345e2d91aeacf82c01e00267a6a Mon Sep 17 00:00:00 2001 From: "L. Applis" <19567117+Twonki@users.noreply.github.com> Date: Tue, 19 Nov 2019 11:56:51 +0000 Subject: [PATCH 003/118] Fixed Broken Links There was no Code of Conduct in this Repository, so it points to the one given as proposal in the Issue Template. There is a Licence, however the link was broken for me too. --- CONTRIBUTING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89095bf..f711b77 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,10 @@ Hi there 👋 We are excited that you want to contribute a new workflow to this repo. By doing this you are helping people get up and running with GitHub Actions and that's cool 😎. -Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). +Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](https://github.com/actions/starter-workflows/blob/master/LICENSE). -Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. +Please note that this project is released with a [Contributor Code of Conduct]( +https://github.com/actions/.github/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. Before merging a new workflow, the following requirements need to be met: From 481a0913efb15847bc0b5e04673f9ce14e863b29 Mon Sep 17 00:00:00 2001 From: John Bohannon Date: Wed, 20 Nov 2019 21:29:34 -0500 Subject: [PATCH 004/118] Update google.yml --- ci/google.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/google.yml b/ci/google.yml index dba17b2..25b912a 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -4,7 +4,8 @@ # # 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc. # -# 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the service account key. +# https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs +# 1. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key. # # 3. Change the values for the GKE_ZONE, GKE_CLUSTER and IMAGE environment variables (below). @@ -71,4 +72,4 @@ jobs: ./kustomize edit set image gcr.io/$GKE_PROJECT/$IMAGE:${GITHUB_SHA} ./kustomize build . | kubectl apply -f - kubectl rollout status deployment/gke-test - kubectl get services -o wide \ No newline at end of file + kubectl get services -o wide From 6150fb463220ecf9bb9ccedfd10ae383f5ab36bc Mon Sep 17 00:00:00 2001 From: John Bohannon Date: Thu, 21 Nov 2019 08:47:27 -0500 Subject: [PATCH 005/118] Update google.yml --- ci/google.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/google.yml b/ci/google.yml index 25b912a..4f23b12 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -4,8 +4,7 @@ # # 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc. # -# https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs -# 1. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key. +# 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs). # # 3. Change the values for the GKE_ZONE, GKE_CLUSTER and IMAGE environment variables (below). From 6939f3ae6d91cdc92b7bdd2332855ac45cf91eeb Mon Sep 17 00:00:00 2001 From: Mijail Rondon Date: Sat, 23 Nov 2019 06:16:37 -0500 Subject: [PATCH 006/118] Use actions/setup-elixir --- ci/elixir.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index eed27bc..7823057 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -7,11 +7,13 @@ jobs: runs-on: ubuntu-latest - container: - image: elixir:1.9.1-slim - steps: - uses: actions/checkout@v1 + - name: Setup elixir + uses: actions/setup-elixir@v1.0.0 + with: + elixir-version: 1.9.x + otp-version: 22.x - name: Install Dependencies run: | mix local.rebar --force From 3ec148162cd9b40a5faf1ce0be81476be54ebf1a Mon Sep 17 00:00:00 2001 From: Mijail Rondon Date: Sat, 23 Nov 2019 06:27:05 -0500 Subject: [PATCH 007/118] Add comments to required arguments --- ci/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 7823057..c0bb8c8 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -12,8 +12,8 @@ jobs: - name: Setup elixir uses: actions/setup-elixir@v1.0.0 with: - elixir-version: 1.9.x - otp-version: 22.x + elixir-version: 1.9.x # Define the elixir version [required] + otp-version: 22.x # Define the OTP version [required] - name: Install Dependencies run: | mix local.rebar --force From b8c1015cb2db0c619db7a99f29c5331930c16b25 Mon Sep 17 00:00:00 2001 From: Chris Sidi Date: Wed, 4 Dec 2019 09:13:48 -0500 Subject: [PATCH 008/118] Don't use actions/checkout@master (#240) See https://github.com/actions/toolkit/blob/master/docs/action-versioning.md --- ci/azure.yml | 2 +- ci/gem-push.yml | 2 +- ci/google.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/azure.yml b/ci/azure.yml index f3683d6..5899aa3 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -23,7 +23,7 @@ jobs: name: Build and Deploy runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v1 - name: Use Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v1 with: diff --git a/ci/gem-push.yml b/ci/gem-push.yml index ff0bfb3..f5fb3b6 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v1 - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: diff --git a/ci/google.yml b/ci/google.yml index 4f23b12..69d6781 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v1 # Setup gcloud CLI - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master From 69953a434cc3cccf73f2297d064e3c89c40bf2fc Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 8 Dec 2019 09:58:56 +1100 Subject: [PATCH 009/118] GitHub Package Registry is now GitHub Packages --- ci/properties/npm-publish.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/npm-publish.properties.json b/ci/properties/npm-publish.properties.json index 989c262..da3da18 100644 --- a/ci/properties/npm-publish.properties.json +++ b/ci/properties/npm-publish.properties.json @@ -1,6 +1,6 @@ { "name": "Node.js Package", - "description": "Publishes a Node.js package to npm and GitHub Package Registry.", + "description": "Publishes a Node.js package to npm and GitHub Packages.", "iconName": "node-package-transparent", "categories": ["JavaScript", "SDLC"] } From 3216c40dc620ecd8b09eb70abb280effb1fa2720 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Fri, 20 Dec 2019 09:00:05 -0800 Subject: [PATCH 010/118] Remove max-parallel --- ci/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/python-package.yml b/ci/python-package.yml index 49c9f0d..d040060 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -7,7 +7,6 @@ jobs: runs-on: ubuntu-latest strategy: - max-parallel: 5 matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] From 04e15fb4634ab45195f0e46b48fd9c33e05b9c95 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Fri, 20 Dec 2019 14:55:35 -0800 Subject: [PATCH 011/118] Use product name --- 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 a2aece3..08271a3 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -1,4 +1,4 @@ -name: Node CI +name: Node.js CI on: [push] From e675aed815e1266791e6e664065da06e01783439 Mon Sep 17 00:00:00 2001 From: Wahyu Kristianto Date: Tue, 24 Dec 2019 19:57:16 +0700 Subject: [PATCH 012/118] Add Directory Permissions --- ci/laravel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/laravel.yml b/ci/laravel.yml index c3841eb..f3d20dc 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -13,6 +13,8 @@ jobs: run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - name: Generate key run: php artisan key:generate + - name: Directory Permissions + run: chmod -R 777 storage bootstrap/cache - name: Create Database run: | mkdir -p database From ca86544176532fab24d03c733152acbfd301f20c Mon Sep 17 00:00:00 2001 From: "Sean C. Sullivan" Date: Tue, 24 Dec 2019 14:22:22 -0800 Subject: [PATCH 013/118] GitHub Actions checkout v1 -> v2 --- ci/android.yml | 2 +- ci/ant.yml | 2 +- ci/aws.yml | 2 +- ci/azure.yml | 2 +- ci/blank.yml | 2 +- ci/c-cpp.yml | 2 +- ci/clojure.yml | 2 +- ci/crystal.yml | 2 +- ci/dart.yml | 2 +- ci/docker-image.yml | 2 +- ci/docker-push.yml | 4 ++-- ci/dotnet-core.yml | 2 +- ci/elixir.yml | 2 +- ci/erlang.yml | 2 +- ci/gem-push.yml | 2 +- ci/go.yml | 2 +- ci/google.yml | 2 +- ci/gradle.yml | 2 +- ci/haskell.yml | 2 +- ci/jekyll.yml | 2 +- ci/laravel.yml | 2 +- ci/maven.yml | 2 +- ci/node.js.yml | 2 +- ci/npm-publish.yml | 6 +++--- ci/php.yml | 2 +- ci/python-app.yml | 2 +- ci/python-package.yml | 2 +- ci/python-publish.yml | 2 +- ci/ruby.yml | 2 +- ci/rust.yml | 2 +- ci/scala.yml | 2 +- ci/swift.yml | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/ci/android.yml b/ci/android.yml index 23f10f1..d03d182 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: set up JDK 1.8 uses: actions/setup-java@v1 with: diff --git a/ci/ant.yml b/ci/ant.yml index d95d6b4..eb70532 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: diff --git a/ci/aws.yml b/ci/aws.yml index 2477e88..374ff09 100644 --- a/ci/aws.yml +++ b/ci/aws.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 diff --git a/ci/azure.yml b/ci/azure.yml index 5899aa3..1e4c5b1 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -23,7 +23,7 @@ jobs: name: Build and Deploy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Use Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v1 with: diff --git a/ci/blank.yml b/ci/blank.yml index 6bee778..317bc22 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Run a one-line script run: echo Hello, world! - name: Run a multi-line script diff --git a/ci/c-cpp.yml b/ci/c-cpp.yml index 2ec6606..16c888d 100644 --- a/ci/c-cpp.yml +++ b/ci/c-cpp.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: configure run: ./configure - name: make diff --git a/ci/clojure.yml b/ci/clojure.yml index 7932491..2ed34a4 100644 --- a/ci/clojure.yml +++ b/ci/clojure.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install dependencies run: lein deps - name: Run tests diff --git a/ci/crystal.yml b/ci/crystal.yml index 3f937eb..ea1f58c 100644 --- a/ci/crystal.yml +++ b/ci/crystal.yml @@ -11,7 +11,7 @@ jobs: image: crystallang/crystal steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install dependencies run: shards install - name: Run tests diff --git a/ci/dart.yml b/ci/dart.yml index 2b99c64..74be049 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -11,7 +11,7 @@ jobs: image: google/dart:latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install dependencies run: pub get - name: Run tests diff --git a/ci/docker-image.yml b/ci/docker-image.yml index d0e70b8..904330b 100644 --- a/ci/docker-image.yml +++ b/ci/docker-image.yml @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Build the Docker image run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/ci/docker-push.yml b/ci/docker-push.yml index 51a36f3..c7e9392 100644 --- a/ci/docker-push.yml +++ b/ci/docker-push.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Run tests run: | @@ -45,7 +45,7 @@ jobs: if: github.event_name == 'push' steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Build image run: docker build . --file Dockerfile --tag image diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index e04df52..3d11219 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: diff --git a/ci/elixir.yml b/ci/elixir.yml index eed27bc..0401caf 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -11,7 +11,7 @@ jobs: image: elixir:1.9.1-slim steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install Dependencies run: | mix local.rebar --force diff --git a/ci/erlang.yml b/ci/erlang.yml index e67464c..0b570b9 100644 --- a/ci/erlang.yml +++ b/ci/erlang.yml @@ -12,7 +12,7 @@ jobs: image: erlang:22.0.7 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Compile run: rebar3 compile - name: Run tests diff --git a/ci/gem-push.yml b/ci/gem-push.yml index f5fb3b6..a635f2e 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: diff --git a/ci/go.yml b/ci/go.yml index 169022b..27e1c6e 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -14,7 +14,7 @@ jobs: id: go - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Get dependencies run: | diff --git a/ci/google.yml b/ci/google.yml index 69d6781..0211ad7 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 # Setup gcloud CLI - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master diff --git a/ci/gradle.yml b/ci/gradle.yml index dc24a2e..4443382 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: diff --git a/ci/haskell.yml b/ci/haskell.yml index 2f9a0d1..3aa0933 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1 with: ghc-version: '8.6.5' diff --git a/ci/jekyll.yml b/ci/jekyll.yml index 7820958..bcb881d 100644 --- a/ci/jekyll.yml +++ b/ci/jekyll.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Build the site in the jekyll/builder container run: | docker run \ diff --git a/ci/laravel.yml b/ci/laravel.yml index c3841eb..ad5d926 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -6,7 +6,7 @@ jobs: laravel-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" - name: Install Dependencies diff --git a/ci/maven.yml b/ci/maven.yml index dbc347f..ee2c5eb 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: diff --git a/ci/node.js.yml b/ci/node.js.yml index 08271a3..e72f5ac 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -12,7 +12,7 @@ jobs: node-version: [8.x, 10.x, 12.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index ed81431..0eede46 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 @@ -19,7 +19,7 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 @@ -33,7 +33,7 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 diff --git a/ci/php.yml b/ci/php.yml index 8e856b8..1eb9bf7 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Validate composer.json and composer.lock run: composer validate diff --git a/ci/python-app.yml b/ci/python-app.yml index 07a10be..4c81e5e 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: diff --git a/ci/python-package.yml b/ci/python-package.yml index d040060..92dc4fc 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -11,7 +11,7 @@ jobs: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: diff --git a/ci/python-publish.yml b/ci/python-publish.yml index 21f2f01..b143a53 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -8,7 +8,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v1 with: diff --git a/ci/ruby.yml b/ci/ruby.yml index 7258d72..cb69ab4 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: diff --git a/ci/rust.yml b/ci/rust.yml index 9ca641b..00f2bf5 100644 --- a/ci/rust.yml +++ b/ci/rust.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Build run: cargo build --verbose - name: Run tests diff --git a/ci/scala.yml b/ci/scala.yml index fbeee57..545ce18 100644 --- a/ci/scala.yml +++ b/ci/scala.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: diff --git a/ci/swift.yml b/ci/swift.yml index 2e76632..9306888 100644 --- a/ci/swift.yml +++ b/ci/swift.yml @@ -8,7 +8,7 @@ jobs: runs-on: macOS-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Build run: swift build -v - name: Run tests From 48b117b9d352cbf17780c54e2c6f41e015c4ab2b Mon Sep 17 00:00:00 2001 From: Mike Coutermarsh Date: Sun, 5 Jan 2020 14:29:49 -0800 Subject: [PATCH 014/118] Update elixir.yml --- ci/elixir.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 51b3088..3fcd8d3 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup elixir - uses: actions/setup-elixir@v1.0.0 + uses: actions/setup-elixir@v1.2.0 with: elixir-version: 1.9.x # Define the elixir version [required] otp-version: 22.x # Define the OTP version [required] From 1f997e9a87dbec71de6f0ec9139c083152a02ea7 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 8 Jan 2020 15:29:10 -0500 Subject: [PATCH 015/118] Use specific versions, remove rebar/hex Rebar and hex are installed by the action already --- ci/elixir.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ci/elixir.yml b/ci/elixir.yml index 3fcd8d3..0e91f9c 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -10,14 +10,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup elixir - uses: actions/setup-elixir@v1.2.0 + uses: actions/setup-elixir@v1 with: - elixir-version: 1.9.x # Define the elixir version [required] - otp-version: 22.x # 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 local.rebar --force - mix local.hex --force - mix deps.get + run: mix deps.get - name: Run Tests run: mix test From 0de7b7f1aeab3f06a3c4db3ebf95b12afb7ee1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudemans?= <31566929+remyoudemans@users.noreply.github.com> Date: Fri, 10 Jan 2020 17:11:21 +0100 Subject: [PATCH 016/118] Make registry hostname and deployment name vars The google.yml deployment workflow starter hardcoded the registry hostname as `gcr.io` even though there are other possible registry hostnames. It also hardcoded the deployment name. This puts them in env variables and adds to the comments that they need to be adjusted by the user. --- ci/google.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ci/google.yml b/ci/google.yml index 0211ad7..beb5e7f 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -6,7 +6,7 @@ # # 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs). # -# 3. Change the values for the GKE_ZONE, GKE_CLUSTER and IMAGE environment variables (below). +# 3. Change the values for the GKE_ZONE, GKE_CLUSTER, IMAGE, REGISTRY_HOSTNAME and DEPLOYMENT_NAME environment variables (below). name: Build and Deploy to GKE @@ -23,6 +23,8 @@ env: GKE_ZONE: us-west1-a GKE_CLUSTER: example-gke-cluster IMAGE: gke-test + REGISTRY_HOSTNAME: gcr.io + DEPLOYMENT_NAME: gke-test jobs: setup-build-publish-deploy: @@ -49,14 +51,14 @@ jobs: # Build the Docker image - name: Build run: | - docker build -t gcr.io/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \ + docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \ --build-arg GITHUB_SHA="$GITHUB_SHA" \ --build-arg GITHUB_REF="$GITHUB_REF" . # Push the Docker image to Google Container Registry - name: Publish run: | - docker push gcr.io/$GKE_PROJECT/$IMAGE:$GITHUB_SHA + docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA # Set up kustomize - name: Set up Kustomize @@ -68,7 +70,7 @@ jobs: - name: Deploy run: | gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT - ./kustomize edit set image gcr.io/$GKE_PROJECT/$IMAGE:${GITHUB_SHA} + ./kustomize edit set image $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:${GITHUB_SHA} ./kustomize build . | kubectl apply -f - - kubectl rollout status deployment/gke-test + kubectl rollout status deployment/$DEPLOYMENT_NAME kubectl get services -o wide From 595b40510a6214f073de4b31c70db22f816b2365 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Sun, 12 Jan 2020 08:33:58 +0000 Subject: [PATCH 017/118] Remove End-of-Life Node.js 8.x Node.js 8 went End-of-Life at the end of 2019 and should not be used in new workflows. --- 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 e72f5ac..a089915 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - node-version: [8.x, 10.x, 12.x] + node-version: [10.x, 12.x] steps: - uses: actions/checkout@v2 From f2cf5bdb47cdded9c5b813ec4d23ad0aa8e3fba6 Mon Sep 17 00:00:00 2001 From: endolith Date: Sat, 18 Jan 2020 20:34:03 -0500 Subject: [PATCH 018/118] Remove Python 2.7 from default tests Python 2 is deprecated: https://www.python.org/doc/sunset-python-2/ --- ci/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/python-package.yml b/ci/python-package.yml index 92dc4fc..3aff529 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: [3.5, 3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 From 0312cce50317ebdb9a8a5adc21f65645191b79ea Mon Sep 17 00:00:00 2001 From: Bhupesh Varshney Date: Thu, 23 Jan 2020 19:47:58 +0530 Subject: [PATCH 019/118] create django.yml --- ci/django.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ci/django.yml diff --git a/ci/django.yml b/ci/django.yml new file mode 100644 index 0000000..031c230 --- /dev/null +++ b/ci/django.yml @@ -0,0 +1,29 @@ +name: Django Build + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run Tests + env: + SECRET_KEY: ${{ secrets.SECRET_KEY }} + DEBUG: False + run: | + python manage.py test From 966381e246103a97f2fb9e09dc1d3158cfe971da Mon Sep 17 00:00:00 2001 From: Bhupesh Varshney Date: Thu, 23 Jan 2020 19:50:34 +0530 Subject: [PATCH 020/118] Create django.properties.json --- ci/properties/django.properties.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ci/properties/django.properties.json diff --git a/ci/properties/django.properties.json b/ci/properties/django.properties.json new file mode 100644 index 0000000..9e1f6c9 --- /dev/null +++ b/ci/properties/django.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Django CI", + "description": "Build and Test a Django Project", + "iconName": "django", + "categories": ["Python", "Django"] +} From 533b24eb42d278f5cfe943a0e720703cd9119a39 Mon Sep 17 00:00:00 2001 From: Bhupesh Varshney Date: Thu, 23 Jan 2020 19:58:58 +0530 Subject: [PATCH 021/118] Update django.properties.json --- ci/properties/django.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/django.properties.json b/ci/properties/django.properties.json index 9e1f6c9..3015441 100644 --- a/ci/properties/django.properties.json +++ b/ci/properties/django.properties.json @@ -1,5 +1,5 @@ { - "name": "Django CI", + "name": "Django", "description": "Build and Test a Django Project", "iconName": "django", "categories": ["Python", "Django"] From e1de33dd71f0e74b0b762d3895c8e4d26ebb06e9 Mon Sep 17 00:00:00 2001 From: Bhupesh Varshney Date: Thu, 23 Jan 2020 20:02:46 +0530 Subject: [PATCH 022/118] Update django.yml --- ci/django.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/django.yml b/ci/django.yml index 031c230..fc9fda8 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -1,4 +1,4 @@ -name: Django Build +name: Django CI on: [push] @@ -17,12 +17,12 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Install Dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Run Tests - env: + env: #define SECRET_KEY in Secrets SECRET_KEY: ${{ secrets.SECRET_KEY }} DEBUG: False run: | From c19bd5e37831f7fc5b5d9866afdb90709734aa33 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Tue, 28 Jan 2020 15:23:17 -0800 Subject: [PATCH 023/118] Updating .NET Core SDK version to LTS 2.2 is no longer supported, so moving to latest SDK released for .NET core which supports and encourages LTS runtime version as well as down-level building. --- ci/dotnet-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index 3d11219..5319a51 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -12,6 +12,6 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 2.2.108 + dotnet-version: 3.1.101 - name: Build with dotnet run: dotnet build --configuration Release From 708e95bab1223509547047a14af7fa93b44b271a Mon Sep 17 00:00:00 2001 From: Chris Sidi Date: Wed, 29 Jan 2020 16:34:28 -0500 Subject: [PATCH 024/118] Switch back to `npm ci` (#214) Switch back to using `npm ci`, which is more efficient than `npm install` --- 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 a089915..d22f03e 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm install + - run: npm ci - run: npm run build --if-present - run: npm test env: From a93d98e2ef08f4caf3a22ceaa77635af36743576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Ka=C5=A1par=20Jir=C3=A1sek?= Date: Thu, 30 Jan 2020 14:52:55 +0100 Subject: [PATCH 025/118] Fix macOS virtual machine case in Swift workflow --- ci/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/swift.yml b/ci/swift.yml index 9306888..8a422f6 100644 --- a/ci/swift.yml +++ b/ci/swift.yml @@ -5,7 +5,7 @@ on: [push] jobs: build: - runs-on: macOS-latest + runs-on: macos-latest steps: - uses: actions/checkout@v2 From 43b0ff3ed0bc90b4c81e33b53c257e07257fd558 Mon Sep 17 00:00:00 2001 From: Bhupesh Varshney Date: Tue, 4 Feb 2020 14:05:26 +0530 Subject: [PATCH 026/118] use actions v2 --- ci/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/django.yml b/ci/django.yml index fc9fda8..9f064b0 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -12,7 +12,7 @@ jobs: python-version: [3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: From b1cd1732eb4b79893de239f5d4a7a39f423fb800 Mon Sep 17 00:00:00 2001 From: Bhupesh Varshney Date: Fri, 7 Feb 2020 18:37:20 +0530 Subject: [PATCH 027/118] remove additional config Removed Additional setup for reading SECRET_KEYs --- ci/django.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci/django.yml b/ci/django.yml index 9f064b0..bcdd8ba 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -22,8 +22,5 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt - name: Run Tests - env: #define SECRET_KEY in Secrets - SECRET_KEY: ${{ secrets.SECRET_KEY }} - DEBUG: False run: | python manage.py test From d037e97e823cf00008c81bf0cb58f647a4aa26a1 Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Wed, 12 Feb 2020 13:26:01 -0500 Subject: [PATCH 028/118] Update starter workflows --- ci/android.yml | 6 +++++- ci/ant.yml | 6 +++++- ci/blank.yml | 6 +++++- ci/c-cpp.yml | 6 +++++- ci/clojure.yml | 6 +++++- ci/crystal.yml | 6 +++++- ci/dart.yml | 6 +++++- ci/django.yml | 6 +++++- ci/docker-image.yml | 6 +++++- ci/dotnet-core.yml | 6 +++++- ci/elixir.yml | 6 +++++- ci/erlang.yml | 6 +++++- ci/gem-push.yml | 8 +++----- ci/go.yml | 8 +++++++- ci/gradle.yml | 6 +++++- ci/haskell.yml | 6 +++++- ci/jekyll.yml | 6 +++++- ci/laravel.yml | 6 +++++- ci/maven.yml | 6 +++++- ci/node.js.yml | 6 +++++- ci/php.yml | 6 +++++- ci/python-app.yml | 6 +++++- ci/python-package.yml | 7 +++++-- ci/ruby.yml | 6 +++++- ci/rust.yml | 6 +++++- ci/scala.yml | 6 +++++- ci/swift.yml | 6 +++++- 27 files changed, 135 insertions(+), 32 deletions(-) diff --git a/ci/android.yml b/ci/android.yml index d03d182..fc55dab 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -1,6 +1,10 @@ name: Android CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/ant.yml b/ci/ant.yml index eb70532..4c9770d 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -1,6 +1,10 @@ name: Java CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/blank.yml b/ci/blank.yml index 317bc22..5b5d105 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -1,6 +1,10 @@ name: CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/c-cpp.yml b/ci/c-cpp.yml index 16c888d..72d3f0e 100644 --- a/ci/c-cpp.yml +++ b/ci/c-cpp.yml @@ -1,6 +1,10 @@ name: C/C++ CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/clojure.yml b/ci/clojure.yml index 2ed34a4..dcc6ab3 100644 --- a/ci/clojure.yml +++ b/ci/clojure.yml @@ -1,6 +1,10 @@ name: Clojure CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/crystal.yml b/ci/crystal.yml index ea1f58c..1da6965 100644 --- a/ci/crystal.yml +++ b/ci/crystal.yml @@ -1,6 +1,10 @@ name: Crystal CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/dart.yml b/ci/dart.yml index 74be049..2193ed0 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -1,6 +1,10 @@ name: Dart CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/django.yml b/ci/django.yml index bcdd8ba..c806047 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -1,6 +1,10 @@ name: Django CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/docker-image.yml b/ci/docker-image.yml index 904330b..7797115 100644 --- a/ci/docker-image.yml +++ b/ci/docker-image.yml @@ -1,6 +1,10 @@ name: Docker Image CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index 3d11219..c8758d7 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -1,6 +1,10 @@ name: .NET Core -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/elixir.yml b/ci/elixir.yml index 0e91f9c..4de7dcb 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -1,6 +1,10 @@ name: Elixir CI -on: push +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/erlang.yml b/ci/erlang.yml index 0b570b9..4b5a44f 100644 --- a/ci/erlang.yml +++ b/ci/erlang.yml @@ -1,6 +1,10 @@ name: Erlang CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: diff --git a/ci/gem-push.yml b/ci/gem-push.yml index a635f2e..08733c7 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -1,12 +1,10 @@ name: Ruby Gem on: - pull_request: - branches: - - master push: - branches: - - master + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/go.yml b/ci/go.yml index 27e1c6e..438d565 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -1,5 +1,11 @@ name: Go -on: [push] + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + jobs: build: diff --git a/ci/gradle.yml b/ci/gradle.yml index 4443382..fdb2e67 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -1,6 +1,10 @@ name: Java CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/haskell.yml b/ci/haskell.yml index 3aa0933..62cc43b 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -1,6 +1,10 @@ name: Haskell CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/jekyll.yml b/ci/jekyll.yml index bcb881d..94ac8f7 100644 --- a/ci/jekyll.yml +++ b/ci/jekyll.yml @@ -1,6 +1,10 @@ name: Jekyll site CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/laravel.yml b/ci/laravel.yml index 352de91..12c7583 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -1,6 +1,10 @@ name: Laravel -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: laravel-tests: diff --git a/ci/maven.yml b/ci/maven.yml index ee2c5eb..8eefff1 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -1,6 +1,10 @@ name: Java CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/node.js.yml b/ci/node.js.yml index d22f03e..d924921 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -1,6 +1,10 @@ name: Node.js CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/php.yml b/ci/php.yml index 1eb9bf7..9d1b435 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -1,6 +1,10 @@ name: PHP Composer -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/python-app.yml b/ci/python-app.yml index 4c81e5e..5536372 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -1,6 +1,10 @@ name: Python application -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/python-package.yml b/ci/python-package.yml index 3aff529..a51d5a0 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -1,7 +1,10 @@ name: Python package -on: [push] - +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/ruby.yml b/ci/ruby.yml index cb69ab4..302d148 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -1,6 +1,10 @@ name: Ruby -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/rust.yml b/ci/rust.yml index 00f2bf5..468e4bf 100644 --- a/ci/rust.yml +++ b/ci/rust.yml @@ -1,6 +1,10 @@ name: Rust -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/scala.yml b/ci/scala.yml index 545ce18..f182d0c 100644 --- a/ci/scala.yml +++ b/ci/scala.yml @@ -1,6 +1,10 @@ name: Scala CI -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/swift.yml b/ci/swift.yml index 8a422f6..5dbdb4f 100644 --- a/ci/swift.yml +++ b/ci/swift.yml @@ -1,6 +1,10 @@ name: Swift -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: From d8d2171b120777ba2430128c42899077a6cf16d5 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 14 Feb 2020 15:07:00 -0500 Subject: [PATCH 029/118] Update aws.properties.json --- ci/properties/aws.properties.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/aws.properties.json b/ci/properties/aws.properties.json index 2988e7c..a8132dc 100644 --- a/ci/properties/aws.properties.json +++ b/ci/properties/aws.properties.json @@ -2,5 +2,5 @@ "name": "Deploy to Amazon ECS", "description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.", "iconName": "aws", - "categories": null -} \ No newline at end of file + "categories": ["Docker"] +} From 4d107f13f7dd13c2585930c033834385395acef8 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 14 Feb 2020 15:08:30 -0500 Subject: [PATCH 030/118] Update azure.properties.json --- ci/properties/azure.properties.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/azure.properties.json b/ci/properties/azure.properties.json index ba92f6f..8ccdc38 100644 --- a/ci/properties/azure.properties.json +++ b/ci/properties/azure.properties.json @@ -2,5 +2,5 @@ "name": "Deploy Node.js to Azure Web App", "description": "Build a Node.js project and deploy it to an Azure Web App.", "iconName": "azure", - "categories": null -} \ No newline at end of file + "categories": ["JavaScript"] +} From 8088828c3924b371bca419dba9df42acaeb97f8e Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 14 Feb 2020 15:09:04 -0500 Subject: [PATCH 031/118] Update google.properties.json --- ci/properties/google.properties.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/google.properties.json b/ci/properties/google.properties.json index dee44b9..877e239 100644 --- a/ci/properties/google.properties.json +++ b/ci/properties/google.properties.json @@ -2,5 +2,5 @@ "name": "Build and Deploy to GKE", "description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.", "iconName": "googlegke", - "categories": null -} \ No newline at end of file + "categories": ["Docker"] +} From d9321333786d559e00c8e2c9e330d05ced0cd4d3 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 14 Feb 2020 15:09:41 -0500 Subject: [PATCH 032/118] Update google.properties.json --- ci/properties/google.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/google.properties.json b/ci/properties/google.properties.json index 877e239..5590cec 100644 --- a/ci/properties/google.properties.json +++ b/ci/properties/google.properties.json @@ -2,5 +2,5 @@ "name": "Build and Deploy to GKE", "description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.", "iconName": "googlegke", - "categories": ["Docker"] + "categories": ["Dockerfile"] } From e6a211ee2a44b98f6f1e42c1d33a54683b45e48c Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 14 Feb 2020 15:10:10 -0500 Subject: [PATCH 033/118] Update ci/properties/aws.properties.json --- ci/properties/aws.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/aws.properties.json b/ci/properties/aws.properties.json index a8132dc..3693743 100644 --- a/ci/properties/aws.properties.json +++ b/ci/properties/aws.properties.json @@ -2,5 +2,5 @@ "name": "Deploy to Amazon ECS", "description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.", "iconName": "aws", - "categories": ["Docker"] + "categories": ["Dockerfile"] } From 71225d47f54b1c341216cdc27f204443619ebba1 Mon Sep 17 00:00:00 2001 From: chenrui Date: Wed, 19 Feb 2020 21:07:29 -0500 Subject: [PATCH 034/118] Update ghc to v8.8.2 --- ci/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/haskell.yml b/ci/haskell.yml index 3aa0933..84bd196 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1 with: - ghc-version: '8.6.5' + ghc-version: '8.8.2' cabal-version: '3.0' - name: Install dependencies run: | From 2ecb907f13265a92d74701f94632b6f2906188e3 Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 10:01:16 -0500 Subject: [PATCH 035/118] More updates to starter workflows --- ci/aws.yml | 8 +++----- ci/azure.yml | 7 +++---- ci/{docker-push.yml => docker-publish.yml} | 2 +- ci/google.yml | 7 +++---- ...roperties.json => docker-publish.properties.json} | 12 ++++++------ ci/properties/gradle.properties.json | 2 +- ci/properties/maven.properties.json | 2 +- ci/properties/npm-publish.properties.json | 2 +- 8 files changed, 19 insertions(+), 23 deletions(-) rename ci/{docker-push.yml => docker-publish.yml} (97%) rename ci/properties/{docker-push.properties.json => docker-publish.properties.json} (71%) diff --git a/ci/aws.yml b/ci/aws.yml index 374ff09..ee498c6 100644 --- a/ci/aws.yml +++ b/ci/aws.yml @@ -1,6 +1,5 @@ # This workflow will build and push a new container image to Amazon ECR, -# and then will deploy a new task definition to Amazon ECS, on every push -# to the master branch. +# and then will deploy a new task definition to Amazon ECS, whenever a release is created # # To use this workflow, you will need to complete the following set-up steps: # @@ -25,9 +24,8 @@ # and best practices on handling the access key credentials. on: - push: - branches: - - master + release: + types: [created] name: Deploy to Amazon ECS diff --git a/ci/azure.yml b/ci/azure.yml index 1e4c5b1..731418e 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -1,4 +1,4 @@ -# This workflow will build and push a node.js application to an Azure Web App on every push to the master branch. +# This workflow will build and push a node.js application to an Azure Web App whenever a release is created. # # To configure this workflow: # @@ -9,9 +9,8 @@ # For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions # For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples on: - push: - branches: - - master + release: + types: [created] env: AZURE_WEBAPP_NAME: your-app-name # set this to your application's name diff --git a/ci/docker-push.yml b/ci/docker-publish.yml similarity index 97% rename from ci/docker-push.yml rename to ci/docker-publish.yml index c7e9392..bb193ad 100644 --- a/ci/docker-push.yml +++ b/ci/docker-publish.yml @@ -35,7 +35,7 @@ jobs: docker build . --file Dockerfile fi - # Push image to GitHub Package Registry. + # Push image to GitHub Packages. # See also https://docs.docker.com/docker-hub/builds/ push: # Ensure test job passes before pushing image. diff --git a/ci/google.yml b/ci/google.yml index beb5e7f..3b743b6 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -1,4 +1,4 @@ -# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE. +# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE whenever a release is created # # To configure this workflow: # @@ -11,9 +11,8 @@ name: Build and Deploy to GKE on: - push: - branches: - - master + release: + types: [created] # Environment variables available to all jobs and steps in this workflow env: diff --git a/ci/properties/docker-push.properties.json b/ci/properties/docker-publish.properties.json similarity index 71% rename from ci/properties/docker-push.properties.json rename to ci/properties/docker-publish.properties.json index d23e119..1b36c0f 100644 --- a/ci/properties/docker-push.properties.json +++ b/ci/properties/docker-publish.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Docker push", - "description": "Build, test and push Docker image to GitHub Package Registry.", - "iconName": "docker", - "categories": ["Dockerfile"] -} +{ + "name": "Publish Docker Container", + "description": "Build, test and push Docker image to GitHub Packages.", + "iconName": "docker", + "categories": ["Dockerfile"] +} diff --git a/ci/properties/gradle.properties.json b/ci/properties/gradle.properties.json index c58d68a..be0a613 100644 --- a/ci/properties/gradle.properties.json +++ b/ci/properties/gradle.properties.json @@ -1,5 +1,5 @@ { - "name": "Gradle", + "name": "Java with Gradle", "description": "Build and test a Java project using a Gradle wrapper script.", "iconName": "gradle", "categories": ["Java", "Gradle"] diff --git a/ci/properties/maven.properties.json b/ci/properties/maven.properties.json index 1875bdc..bcc8430 100644 --- a/ci/properties/maven.properties.json +++ b/ci/properties/maven.properties.json @@ -1,5 +1,5 @@ { - "name": "Maven", + "name": "Java with Maven", "description": "Build and test a Java project with Apache Maven.", "iconName": "maven", "categories": ["Java", "Maven"] diff --git a/ci/properties/npm-publish.properties.json b/ci/properties/npm-publish.properties.json index da3da18..d253373 100644 --- a/ci/properties/npm-publish.properties.json +++ b/ci/properties/npm-publish.properties.json @@ -1,5 +1,5 @@ { - "name": "Node.js Package", + "name": "Publish Node.js Package", "description": "Publishes a Node.js package to npm and GitHub Packages.", "iconName": "node-package-transparent", "categories": ["JavaScript", "SDLC"] From 325e76073bc0222bf19dedea8bcd70c5495426da Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 11:33:16 -0500 Subject: [PATCH 036/118] Add new starter workflows --- ci/gradle-publish.yml | 30 ++++++++++++++++++++ ci/maven-publish.yml | 30 ++++++++++++++++++++ ci/properties/gradle-publish.properties.json | 6 ++++ ci/properties/maven-publish.properties.json | 6 ++++ 4 files changed, 72 insertions(+) create mode 100644 ci/gradle-publish.yml create mode 100644 ci/maven-publish.yml create mode 100644 ci/properties/gradle-publish.properties.json create mode 100644 ci/properties/maven-publish.properties.json diff --git a/ci/gradle-publish.yml b/ci/gradle-publish.yml new file mode 100644 index 0000000..53aa48c --- /dev/null +++ b/ci/gradle-publish.yml @@ -0,0 +1,30 @@ +# This workflow will build a package using gradle and then publish it to GitHub packages whenever a release is created +# For more information see: https://github.com/actions/setup-java#publishing-using-gradle + +name: Gradle Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/ci/maven-publish.yml b/ci/maven-publish.yml new file mode 100644 index 0000000..64b1ae0 --- /dev/null +++ b/ci/maven-publish.yml @@ -0,0 +1,30 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages whenever a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/ci/properties/gradle-publish.properties.json b/ci/properties/gradle-publish.properties.json new file mode 100644 index 0000000..eae856b --- /dev/null +++ b/ci/properties/gradle-publish.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Publish Java Package with Gradle", + "description": "Build a Java Package using Gradle and publish it to GitHub Packages.", + "iconName": "gradle", + "categories": ["Java", "Gradle"] +} \ No newline at end of file diff --git a/ci/properties/maven-publish.properties.json b/ci/properties/maven-publish.properties.json new file mode 100644 index 0000000..a13852e --- /dev/null +++ b/ci/properties/maven-publish.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Publish Java Package with Maven", + "description": "Build a Java Package using Maven and publish it to GitHub Packages.", + "iconName": "maven", + "categories": ["Java", "Maven"] +} \ No newline at end of file From b0d776c6782f8337c7582891f1dfe18ad110004e Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 12:44:22 -0500 Subject: [PATCH 037/118] Documentation --- ci/ant.yml | 3 +++ ci/aws.yml | 2 +- ci/azure.yml | 2 +- ci/google.yml | 2 +- ci/gradle-publish.yml | 2 +- ci/gradle.yml | 5 ++++- ci/maven-publish.yml | 2 +- ci/maven.yml | 5 ++++- ci/npm-publish.yml | 3 +++ 9 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ci/ant.yml b/ci/ant.yml index 4c9770d..7077f90 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -1,3 +1,6 @@ +# This workflow will build a Java project with Ant +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant + name: Java CI on: diff --git a/ci/aws.yml b/ci/aws.yml index ee498c6..40094ae 100644 --- a/ci/aws.yml +++ b/ci/aws.yml @@ -1,5 +1,5 @@ # This workflow will build and push a new container image to Amazon ECR, -# and then will deploy a new task definition to Amazon ECS, whenever a release is created +# and then will deploy a new task definition to Amazon ECS, when a release is created # # To use this workflow, you will need to complete the following set-up steps: # diff --git a/ci/azure.yml b/ci/azure.yml index 731418e..d0f5576 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -1,4 +1,4 @@ -# This workflow will build and push a node.js application to an Azure Web App whenever a release is created. +# This workflow will build and push a node.js application to an Azure Web App when a release is created. # # To configure this workflow: # diff --git a/ci/google.yml b/ci/google.yml index 3b743b6..b8d1079 100644 --- a/ci/google.yml +++ b/ci/google.yml @@ -1,4 +1,4 @@ -# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE whenever a release is created +# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when a release is created # # To configure this workflow: # diff --git a/ci/gradle-publish.yml b/ci/gradle-publish.yml index 53aa48c..fe0fd85 100644 --- a/ci/gradle-publish.yml +++ b/ci/gradle-publish.yml @@ -1,4 +1,4 @@ -# This workflow will build a package using gradle and then publish it to GitHub packages whenever a release is created +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java#publishing-using-gradle name: Gradle Package diff --git a/ci/gradle.yml b/ci/gradle.yml index fdb2e67..50bea75 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -1,4 +1,7 @@ -name: Java CI +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Java CI with Gradle on: push: diff --git a/ci/maven-publish.yml b/ci/maven-publish.yml index 64b1ae0..fb1c7ee 100644 --- a/ci/maven-publish.yml +++ b/ci/maven-publish.yml @@ -1,4 +1,4 @@ -# This workflow will build a package using Maven and then publish it to GitHub packages whenever a release is created +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path name: Maven Package diff --git a/ci/maven.yml b/ci/maven.yml index 8eefff1..c3e16c6 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -1,4 +1,7 @@ -name: Java CI +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven on: push: diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 0eede46..81cbddb 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -1,3 +1,6 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + name: Node.js Package on: From 0c0e0c1a33a7f54136351189cf9a039dcbecbb32 Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 12:54:19 -0500 Subject: [PATCH 038/118] Update gradle --- ci/gradle-publish.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/gradle-publish.yml b/ci/gradle-publish.yml index fe0fd85..118b075 100644 --- a/ci/gradle-publish.yml +++ b/ci/gradle-publish.yml @@ -21,10 +21,11 @@ jobs: server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Build with Gradle + run: gradle build - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + - name: Publish to GitHub Packages + run: gradle publish env: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + USERNAME: ${{ github.actor }} + PASSWORD: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 5d2c37103af9df51948f528578f72315ff238ac1 Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 13:11:39 -0500 Subject: [PATCH 039/118] Misc updates --- ci/properties/gradle-publish.properties.json | 2 +- ci/properties/maven-publish.properties.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/gradle-publish.properties.json b/ci/properties/gradle-publish.properties.json index eae856b..90b7295 100644 --- a/ci/properties/gradle-publish.properties.json +++ b/ci/properties/gradle-publish.properties.json @@ -1,6 +1,6 @@ { "name": "Publish Java Package with Gradle", - "description": "Build a Java Package using Gradle and publish it to GitHub Packages.", + "description": "Build a Java Package using Gradle and publish to GitHub Packages.", "iconName": "gradle", "categories": ["Java", "Gradle"] } \ No newline at end of file diff --git a/ci/properties/maven-publish.properties.json b/ci/properties/maven-publish.properties.json index a13852e..2f59f41 100644 --- a/ci/properties/maven-publish.properties.json +++ b/ci/properties/maven-publish.properties.json @@ -1,6 +1,6 @@ { "name": "Publish Java Package with Maven", - "description": "Build a Java Package using Maven and publish it to GitHub Packages.", + "description": "Build a Java Package using Maven and publish to GitHub Packages.", "iconName": "maven", "categories": ["Java", "Maven"] } \ No newline at end of file From 5ce12321a2fb33a428c3e7fb2dddac03276083da Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 13:59:00 -0500 Subject: [PATCH 040/118] Documentation for the basic workflow --- ci/blank.yml | 14 +++++++++++++- ci/node.js.yml | 3 +++ ci/python-app.yml | 3 +++ ci/python-package.yml | 4 ++++ ci/python-publish.yml | 3 +++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ci/blank.yml b/ci/blank.yml index 5b5d105..81e3002 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -1,20 +1,32 @@ +# This is a basic workflow to help you get started with Actions + name: CI +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch on: push: branches: [ master ] pull_request: branches: [ master ] +# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + # This workflow contains a single job called "build" build: - + # 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: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + + # Runs a single command using the runners shell - name: Run a one-line script run: echo Hello, world! + + # Runs a set of commands using the runners shell - name: Run a multi-line script run: | echo Add other actions to build, diff --git a/ci/node.js.yml b/ci/node.js.yml index d924921..e7081a4 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -1,3 +1,6 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + name: Node.js CI on: diff --git a/ci/python-app.yml b/ci/python-app.yml index 5536372..1519cec 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -1,3 +1,6 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + name: Python application on: diff --git a/ci/python-package.yml b/ci/python-package.yml index a51d5a0..846b2f9 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -1,3 +1,6 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + name: Python package on: @@ -5,6 +8,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + jobs: build: diff --git a/ci/python-publish.yml b/ci/python-publish.yml index b143a53..b20652e 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -1,3 +1,6 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + name: Upload Python Package on: From 4e1cbdb464b643f07c941d9c10174f5b2921b604 Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Fri, 21 Feb 2020 12:55:06 -0500 Subject: [PATCH 041/118] PR feedback --- ci/gradle-publish.yml | 2 ++ ci/laravel.yml | 2 ++ ci/python-publish.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ci/gradle-publish.yml b/ci/gradle-publish.yml index 118b075..38b3656 100644 --- a/ci/gradle-publish.yml +++ b/ci/gradle-publish.yml @@ -24,6 +24,8 @@ jobs: - name: Build with Gradle run: gradle build + # The USERNAME and PASSWORD need to correspond to the credentials environment variables used in + # the publishing section of your build.gradle - name: Publish to GitHub Packages run: gradle publish env: diff --git a/ci/laravel.yml b/ci/laravel.yml index 12c7583..7fc4665 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -8,7 +8,9 @@ on: jobs: laravel-tests: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Copy .env diff --git a/ci/python-publish.yml b/ci/python-publish.yml index b20652e..d5f3859 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -9,7 +9,9 @@ on: jobs: deploy: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Set up Python From 90e0057b612f1edbcf67b87bd3661fc1fca7363d Mon Sep 17 00:00:00 2001 From: mingshun Date: Thu, 27 Feb 2020 10:46:47 +0800 Subject: [PATCH 042/118] Add Tencent Cloud starter workflow --- ci/properties/tencent.properties.json | 6 +++ ci/tencent.yml | 76 +++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 ci/properties/tencent.properties.json create mode 100644 ci/tencent.yml diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json new file mode 100644 index 0000000..d93a25e --- /dev/null +++ b/ci/properties/tencent.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Build and Deploy to TKE", + "description": "Build a Docker container, publish it to TKE Registry, and deploy to TKE cluster.", + "iconName": "tencentcloud", + "categories": ["Dockerfile"] +} diff --git a/ci/tencent.yml b/ci/tencent.yml new file mode 100644 index 0000000..8b937bc --- /dev/null +++ b/ci/tencent.yml @@ -0,0 +1,76 @@ +# This workflow will build a docker container, publish it to TKE Registry, and deploy it to TKE. +# +# To configure this workflow: +# +# 1. Ensure that your repository contains the necessary configuration for your Tencent Kubernetes Engine cluster, +# including deployment.yml, kustomization.yml, service.yml, etc. +# +# 2. Set up secrets in your workspace: +# - TENCENT_CLOUD_SECRET_ID with Tencent Cloud secret id +# - TENCENT_CLOUD_SECRET_KEY with Tencent Cloud secret key +# - TENCENT_CLOUD_ACCOUNT_ID with Tencent Cloud account id +# - TKE_REGISTRY_PASSWORD with TKE registry password +# +# 3. Change the values for the TKE_IMAGE_URL, TKE_REGION, TKE_CLUSTER_ID and DEPLOYMENT_NAME environment variables (below). + +name: Build and Deploy to TKE + +on: + push: + branches: + - master + +# Environment variables available to all jobs and steps in this workflow +env: + TKE_IMAGE_URL: ccr.ccs.tencentyun.com/demo/mywebapp + TKE_REGION: ap-guangzhou + TKE_CLUSTER_ID: cls-mywebapp + DEPLOYMENT_NAME: tke-test + +jobs: + setup-build-publish-deploy: + name: Setup, Build, Publish, and Deploy + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + # Build + - name: Build Docker image + run: | + docker build -t ${TKE_IMAGE_URL}:${GITHUB_SHA} . + + - name: Login TKE Registry + run: | + docker login -u ${{ secrets.TENCENT_CLOUD_ACCOUNT_ID }} -p ${{ secrets.TKE_REGISTRY_PASSWORD }} ${TKE_IMAGE_URL} + + # Push the Docker image to TKE Registry + - name: Publish + run: | + docker push ${TKE_IMAGE_URL}:${GITHUB_SHA} + + - name: Set up Kustomize + run: | + curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 + chmod u+x ./kustomize + + - name: Set up ~/.kube/config for connecting TKE cluster + uses: TencentCloud/tke-cluster-credential-action@v1 + with: + secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} + secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} + tke_region: ${{ env.TKE_REGION }} + cluster_id: ${{ env.TKE_CLUSTER_ID }} + + - name: Switch to TKE context + run: | + kubectl config use-context ${TKE_CLUSTER_ID}-context-default + + # Deploy the Docker image to the TKE cluster + - name: Deploy + run: | + ./kustomize edit set image ${TKE_IMAGE_URL}:${GITHUB_SHA} + ./kustomize build . | kubectl apply -f - + kubectl rollout status deployment/${DEPLOYMENT_NAME} + kubectl get services -o wide \ No newline at end of file From 63d39d990b70a698453af81a147f4297e5a34459 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 28 Feb 2020 15:24:15 +0000 Subject: [PATCH 043/118] Update README with guidance Tell people how to use these starter workflows. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b1dd935..ffe04a3 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ ## Starter Workflows - +These are the workflow files for helping people get started with GitHub Actions. They're presented whenever you start to create a new GitHub Actions workflow. -These are the workflow files for helping people get started with GitHub Actions. +**If you want to get started with GitHub actions, you can use these starter workflows by clicking the "Actions" tab in the repository where you want to create a workflow.** + + **Directory structure:** * [ci](ci): solutions for Continuous Integration From 32e42a51fbc9371e9d49732373ff147ee1681103 Mon Sep 17 00:00:00 2001 From: Mike Coutermarsh Date: Sat, 29 Feb 2020 17:04:55 -0800 Subject: [PATCH 044/118] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffe04a3..5d81359 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ These are the workflow files for helping people get started with GitHub Actions. They're presented whenever you start to create a new GitHub Actions workflow. -**If you want to get started with GitHub actions, you can use these starter workflows by clicking the "Actions" tab in the repository where you want to create a workflow.** +**If you want to get started with GitHub Actions, you can use these starter workflows by clicking the "Actions" tab in the repository where you want to create a workflow.** From 1af242240f78dc95005b006c35988ad7766863af Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Tue, 3 Mar 2020 17:06:43 +0100 Subject: [PATCH 045/118] Revert "Add missing categories" --- ci/properties/aws.properties.json | 4 ++-- ci/properties/azure.properties.json | 4 ++-- ci/properties/google.properties.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/properties/aws.properties.json b/ci/properties/aws.properties.json index 3693743..2988e7c 100644 --- a/ci/properties/aws.properties.json +++ b/ci/properties/aws.properties.json @@ -2,5 +2,5 @@ "name": "Deploy to Amazon ECS", "description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.", "iconName": "aws", - "categories": ["Dockerfile"] -} + "categories": null +} \ No newline at end of file diff --git a/ci/properties/azure.properties.json b/ci/properties/azure.properties.json index 8ccdc38..ba92f6f 100644 --- a/ci/properties/azure.properties.json +++ b/ci/properties/azure.properties.json @@ -2,5 +2,5 @@ "name": "Deploy Node.js to Azure Web App", "description": "Build a Node.js project and deploy it to an Azure Web App.", "iconName": "azure", - "categories": ["JavaScript"] -} + "categories": null +} \ No newline at end of file diff --git a/ci/properties/google.properties.json b/ci/properties/google.properties.json index 5590cec..dee44b9 100644 --- a/ci/properties/google.properties.json +++ b/ci/properties/google.properties.json @@ -2,5 +2,5 @@ "name": "Build and Deploy to GKE", "description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.", "iconName": "googlegke", - "categories": ["Dockerfile"] -} + "categories": null +} \ No newline at end of file From cb7f7926da8178aead88d77a79d8579b1b04bd79 Mon Sep 17 00:00:00 2001 From: Usha N Date: Mon, 9 Mar 2020 15:57:09 +0530 Subject: [PATCH 046/118] Updated template to use azure/webapps-deploy@v2 --- ci/azure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure.yml b/ci/azure.yml index d0f5576..dbb46b6 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -35,8 +35,8 @@ jobs: npm run build --if-present npm run test --if-present - name: 'Deploy to Azure WebApp' - uses: azure/webapps-deploy@v1 + uses: azure/webapps-deploy@v2 with: app-name: ${{ env.AZURE_WEBAPP_NAME }} publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} \ No newline at end of file + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From 514247182a4f2b9ff2894718227891cefb377229 Mon Sep 17 00:00:00 2001 From: wysohn Date: Sun, 15 Mar 2020 03:47:21 -0700 Subject: [PATCH 047/118] Inconsistent environmental variable name https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages In the example above, the Gradle code tries to get the token value from the `TOKEN`, yet this workflow saves the token in the `PASSWORD`. Easy fix yet can save lots of time for newcomers. --- ci/gradle-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gradle-publish.yml b/ci/gradle-publish.yml index 38b3656..cec487e 100644 --- a/ci/gradle-publish.yml +++ b/ci/gradle-publish.yml @@ -24,10 +24,10 @@ jobs: - name: Build with Gradle run: gradle build - # The USERNAME and PASSWORD need to correspond to the credentials environment variables used in + # The USERNAME and TOKEN need to correspond to the credentials environment variables used in # the publishing section of your build.gradle - name: Publish to GitHub Packages run: gradle publish env: USERNAME: ${{ github.actor }} - PASSWORD: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + TOKEN: ${{ secrets.GITHUB_TOKEN }} From 781776c22858249cb710906140426ab50a3f15da Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 17 Mar 2020 11:08:17 +0000 Subject: [PATCH 048/118] Update .NET Core CI template Run a `dotnet restore` step, run tests. --- ci/dotnet-core.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index a925bc2..c2a722b 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -17,5 +17,9 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.101 - - name: Build with dotnet - run: dotnet build --configuration Release + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore --verbosity normal From efb9b5890272160f642e4f4bf190be15d7db356a Mon Sep 17 00:00:00 2001 From: Jiale Liu Date: Wed, 18 Mar 2020 12:08:46 +0800 Subject: [PATCH 049/118] Bug fix : repository name must be lowercase https://github.com/Licsber/opencv-docker/runs/514244582?check_suite_focus=true Push image: Error parsing reference: "docker.pkg.github.com/Licsber/opencv-docker/opencv:latest" is not a valid repository/tag: invalid reference format: repository name must be lowercase My username contains uppercase characters, this make push failed. So fix the bug by change all uppercase in IMAGE_ID to lowercase. --- ci/docker-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index bb193ad..21f5bd1 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -56,6 +56,9 @@ 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]') # Strip git ref prefix from version VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') From 391c5961e991c1152b2a98ed27a9c372048472b7 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 20 Mar 2020 12:17:18 +0000 Subject: [PATCH 050/118] npm-publish: remove explicit scope The setup-node action will default the scope to the correct user (the repo owner), so we do not need to explicitly include it in the workflow. Removing it ensures that the starter template is easier for people to use; now there are no changes necessary to get started. https://github.com/actions/setup-node/blob/master/src/authutil.ts#L26 --- ci/npm-publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 81cbddb..861e372 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -41,7 +41,6 @@ jobs: with: node-version: 12 registry-url: https://npm.pkg.github.com/ - scope: '@your-github-username' - run: npm ci - run: npm publish env: From ed5cb0096e70c082ac4b02ed25d3fc8b24a41525 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 17 Mar 2020 11:13:06 +0000 Subject: [PATCH 051/118] Include a .gitattributes Every good git repository should have a .gitattributes file. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto From 8beb802437927d71bbb91605d15491672edf222a Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 17 Mar 2020 11:17:19 +0000 Subject: [PATCH 052/118] Renormalize line endings We should have consistent line endings in our repository; now that we have a .gitattributes file, update the repository contents to match expectations. --- ci/android.yml | 42 +++++----- ci/ant.yml | 48 ++++++------ ci/blank.yml | 66 ++++++++-------- ci/c-cpp.yml | 46 +++++------ ci/clojure.yml | 38 +++++----- ci/crystal.yml | 44 +++++------ ci/dart.yml | 44 +++++------ ci/docker-image.yml | 36 ++++----- ci/dotnet-core.yml | 50 ++++++------ ci/erlang.yml | 46 +++++------ ci/go.yml | 68 ++++++++--------- ci/gradle.yml | 52 ++++++------- ci/haskell.yml | 58 +++++++------- ci/jekyll.yml | 40 +++++----- ci/maven.yml | 48 ++++++------ ci/node.js.yml | 62 +++++++-------- ci/properties/android.properties.json | 12 +-- ci/properties/ant.properties.json | 12 +-- ci/properties/blank.properties.json | 12 +-- ci/properties/c-cpp.properties.json | 12 +-- ci/properties/clojure.properties.json | 12 +-- ci/properties/crystal.properties.json | 12 +-- ci/properties/dart.properties.json | 12 +-- ci/properties/docker-image.properties.json | 12 +-- ci/properties/dotnet-core.properties.json | 12 +-- ci/properties/elixir.properties.json | 12 +-- ci/properties/erlang.properties.json | 12 +-- ci/properties/go.properties.json | 12 +-- ci/properties/gradle.properties.json | 12 +-- ci/properties/haskell.properties.json | 12 +-- ci/properties/jekyll.properties.json | 12 +-- ci/properties/maven.properties.json | 12 +-- ci/properties/node.js.properties.json | 12 +-- ci/properties/python-app.properties.json | 12 +-- ci/properties/python-package.properties.json | 12 +-- ci/properties/ruby.properties.json | 12 +-- ci/properties/rust.properties.json | 10 +-- ci/python-app.yml | 74 +++++++++--------- ci/python-package.yml | 80 ++++++++++---------- ci/ruby.yml | 48 ++++++------ ci/rust.yml | 38 +++++----- 41 files changed, 639 insertions(+), 639 deletions(-) diff --git a/ci/android.yml b/ci/android.yml index fc55dab..7ec0147 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -1,21 +1,21 @@ -name: Android CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Build with Gradle - run: ./gradlew build +name: Android CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Gradle + run: ./gradlew build diff --git a/ci/ant.yml b/ci/ant.yml index 7077f90..efebba5 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -1,24 +1,24 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant - -name: Java CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Build with Ant - run: ant -noinput -buildfile build.xml +# This workflow will build a Java project with Ant +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant + +name: Java CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Ant + run: ant -noinput -buildfile build.xml diff --git a/ci/blank.yml b/ci/blank.yml index 81e3002..d6783e2 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -1,33 +1,33 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # 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: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # 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: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. diff --git a/ci/c-cpp.yml b/ci/c-cpp.yml index 72d3f0e..e323326 100644 --- a/ci/c-cpp.yml +++ b/ci/c-cpp.yml @@ -1,23 +1,23 @@ -name: C/C++ CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck diff --git a/ci/clojure.yml b/ci/clojure.yml index dcc6ab3..22bfe20 100644 --- a/ci/clojure.yml +++ b/ci/clojure.yml @@ -1,19 +1,19 @@ -name: Clojure CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: lein deps - - name: Run tests - run: lein test +name: Clojure CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: lein deps + - name: Run tests + run: lein test diff --git a/ci/crystal.yml b/ci/crystal.yml index 1da6965..ce9dbfc 100644 --- a/ci/crystal.yml +++ b/ci/crystal.yml @@ -1,22 +1,22 @@ -name: Crystal CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - container: - image: crystallang/crystal - - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: shards install - - name: Run tests - run: crystal spec +name: Crystal CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + container: + image: crystallang/crystal + + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: shards install + - name: Run tests + run: crystal spec diff --git a/ci/dart.yml b/ci/dart.yml index 2193ed0..11e18c7 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -1,22 +1,22 @@ -name: Dart CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - container: - image: google/dart:latest - - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: pub get - - name: Run tests - run: pub run test +name: Dart CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + container: + image: google/dart:latest + + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: pub get + - name: Run tests + run: pub run test diff --git a/ci/docker-image.yml b/ci/docker-image.yml index 7797115..e57d42a 100644 --- a/ci/docker-image.yml +++ b/ci/docker-image.yml @@ -1,18 +1,18 @@ -name: Docker Image CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index c2a722b..f734ea7 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -1,25 +1,25 @@ -name: .NET Core - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-restore --verbosity normal +name: .NET Core + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore --verbosity normal diff --git a/ci/erlang.yml b/ci/erlang.yml index 4b5a44f..fd28497 100644 --- a/ci/erlang.yml +++ b/ci/erlang.yml @@ -1,23 +1,23 @@ -name: Erlang CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - - build: - - runs-on: ubuntu-latest - - container: - image: erlang:22.0.7 - - steps: - - uses: actions/checkout@v2 - - name: Compile - run: rebar3 compile - - name: Run tests - run: rebar3 do eunit, ct +name: Erlang CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + container: + image: erlang:22.0.7 + + steps: + - uses: actions/checkout@v2 + - name: Compile + run: rebar3 compile + - name: Run tests + run: rebar3 do eunit, ct diff --git a/ci/go.yml b/ci/go.yml index 438d565..b66c0d7 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -1,34 +1,34 @@ -name: Go - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Build - run: go build -v . +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v . diff --git a/ci/gradle.yml b/ci/gradle.yml index 50bea75..58e1c59 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -1,26 +1,26 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build diff --git a/ci/haskell.yml b/ci/haskell.yml index 290b315..3952e56 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -1,29 +1,29 @@ -name: Haskell CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 - with: - ghc-version: '8.8.2' - cabal-version: '3.0' - - name: Install dependencies - run: | - cabal update - cabal install --only-dependencies --enable-tests - - name: Build - run: | - cabal configure --enable-tests - cabal build - - name: Run tests - run: cabal test +name: Haskell CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1 + with: + ghc-version: '8.8.2' + cabal-version: '3.0' + - name: Install dependencies + run: | + cabal update + cabal install --only-dependencies --enable-tests + - name: Build + run: | + cabal configure --enable-tests + cabal build + - name: Run tests + run: cabal test diff --git a/ci/jekyll.yml b/ci/jekyll.yml index 94ac8f7..64df081 100644 --- a/ci/jekyll.yml +++ b/ci/jekyll.yml @@ -1,20 +1,20 @@ -name: Jekyll site CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build the site in the jekyll/builder container - run: | - docker run \ - -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ - jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future" +name: Jekyll site CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the site in the jekyll/builder container + run: | + docker run \ + -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ + jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future" diff --git a/ci/maven.yml b/ci/maven.yml index c3e16c6..c8aeb3a 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -1,24 +1,24 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java CI with Maven - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Build with Maven - run: mvn -B package --file pom.xml +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/ci/node.js.yml b/ci/node.js.yml index e7081a4..4390e93 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -1,31 +1,31 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm test - env: - CI: true +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test + env: + CI: true diff --git a/ci/properties/android.properties.json b/ci/properties/android.properties.json index a557fd9..29d293f 100644 --- a/ci/properties/android.properties.json +++ b/ci/properties/android.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Android CI", - "description": "Build an Android project with Gradle.", - "iconName": "android", - "categories": ["Java", "Mobile"] -} \ No newline at end of file +{ + "name": "Android CI", + "description": "Build an Android project with Gradle.", + "iconName": "android", + "categories": ["Java", "Mobile"] +} diff --git a/ci/properties/ant.properties.json b/ci/properties/ant.properties.json index 4139b67..5a4d7a9 100644 --- a/ci/properties/ant.properties.json +++ b/ci/properties/ant.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Java with Ant", - "description": "Build and test a Java project with Apache Ant.", - "iconName": "ant", - "categories": ["Ant", "Java"] -} \ No newline at end of file +{ + "name": "Java with Ant", + "description": "Build and test a Java project with Apache Ant.", + "iconName": "ant", + "categories": ["Ant", "Java"] +} diff --git a/ci/properties/blank.properties.json b/ci/properties/blank.properties.json index 927085b..d244772 100644 --- a/ci/properties/blank.properties.json +++ b/ci/properties/blank.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Simple workflow", - "description": "Start with a file with the minimum necessary structure.", - "iconName": "blank", - "categories": null -} \ No newline at end of file +{ + "name": "Simple workflow", + "description": "Start with a file with the minimum necessary structure.", + "iconName": "blank", + "categories": null +} diff --git a/ci/properties/c-cpp.properties.json b/ci/properties/c-cpp.properties.json index 605cd89..5d2a2df 100644 --- a/ci/properties/c-cpp.properties.json +++ b/ci/properties/c-cpp.properties.json @@ -1,6 +1,6 @@ -{ - "name": "C/C++ with Make", - "description": "Build and test a C/C++ project using Make.", - "iconName": "c-cpp", - "categories": ["C", "C++"] -} \ No newline at end of file +{ + "name": "C/C++ with Make", + "description": "Build and test a C/C++ project using Make.", + "iconName": "c-cpp", + "categories": ["C", "C++"] +} diff --git a/ci/properties/clojure.properties.json b/ci/properties/clojure.properties.json index 9d17772..5a9e3ed 100644 --- a/ci/properties/clojure.properties.json +++ b/ci/properties/clojure.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Clojure", - "description": "Build and test a Clojure project with Leiningen.", - "iconName": "clojure", - "categories": ["Clojure", "Java"] -} \ No newline at end of file +{ + "name": "Clojure", + "description": "Build and test a Clojure project with Leiningen.", + "iconName": "clojure", + "categories": ["Clojure", "Java"] +} diff --git a/ci/properties/crystal.properties.json b/ci/properties/crystal.properties.json index f5edf7d..bb058f7 100644 --- a/ci/properties/crystal.properties.json +++ b/ci/properties/crystal.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Crystal", - "description": "Build and test a Crystal project.", - "iconName": "crystal", - "categories": ["Crystal"] -} \ No newline at end of file +{ + "name": "Crystal", + "description": "Build and test a Crystal project.", + "iconName": "crystal", + "categories": ["Crystal"] +} diff --git a/ci/properties/dart.properties.json b/ci/properties/dart.properties.json index a0aad8c..022a003 100644 --- a/ci/properties/dart.properties.json +++ b/ci/properties/dart.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Dart", - "description": "Build and test a Dart project with Pub.", - "iconName": "dart", - "categories": ["Dart"] -} \ No newline at end of file +{ + "name": "Dart", + "description": "Build and test a Dart project with Pub.", + "iconName": "dart", + "categories": ["Dart"] +} diff --git a/ci/properties/docker-image.properties.json b/ci/properties/docker-image.properties.json index 2db2368..8ad7552 100644 --- a/ci/properties/docker-image.properties.json +++ b/ci/properties/docker-image.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Docker image", - "description": "Build a Docker image to deploy, run, or push to a registry.", - "iconName": "docker", - "categories": ["Dockerfile"] -} \ No newline at end of file +{ + "name": "Docker image", + "description": "Build a Docker image to deploy, run, or push to a registry.", + "iconName": "docker", + "categories": ["Dockerfile"] +} diff --git a/ci/properties/dotnet-core.properties.json b/ci/properties/dotnet-core.properties.json index d5dc23a..3386a3d 100644 --- a/ci/properties/dotnet-core.properties.json +++ b/ci/properties/dotnet-core.properties.json @@ -1,6 +1,6 @@ -{ - "name": ".NET Core", - "description": "Build and test a .NET Core or ASP.NET Core project.", - "iconName": "dotnetcore", - "categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"] -} +{ + "name": ".NET Core", + "description": "Build and test a .NET Core or ASP.NET Core project.", + "iconName": "dotnetcore", + "categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"] +} diff --git a/ci/properties/elixir.properties.json b/ci/properties/elixir.properties.json index 4b082d7..572992d 100644 --- a/ci/properties/elixir.properties.json +++ b/ci/properties/elixir.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Elixir", - "description": "Build and test an Elixir project with Mix.", - "iconName": "elixir", - "categories": ["Elixir", "Erlang"] -} \ No newline at end of file +{ + "name": "Elixir", + "description": "Build and test an Elixir project with Mix.", + "iconName": "elixir", + "categories": ["Elixir", "Erlang"] +} diff --git a/ci/properties/erlang.properties.json b/ci/properties/erlang.properties.json index c728ac2..d712b05 100644 --- a/ci/properties/erlang.properties.json +++ b/ci/properties/erlang.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Erlang", - "description": "Build and test an Erlang project with rebar.", - "iconName": "erlang", - "categories": ["Erlang"] -} \ No newline at end of file +{ + "name": "Erlang", + "description": "Build and test an Erlang project with rebar.", + "iconName": "erlang", + "categories": ["Erlang"] +} diff --git a/ci/properties/go.properties.json b/ci/properties/go.properties.json index 3391245..b96c0a1 100644 --- a/ci/properties/go.properties.json +++ b/ci/properties/go.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Go", - "description": "Build a Go project.", - "iconName": "go", - "categories": ["Go"] -} \ No newline at end of file +{ + "name": "Go", + "description": "Build a Go project.", + "iconName": "go", + "categories": ["Go"] +} diff --git a/ci/properties/gradle.properties.json b/ci/properties/gradle.properties.json index be0a613..bfe1a6f 100644 --- a/ci/properties/gradle.properties.json +++ b/ci/properties/gradle.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Java with Gradle", - "description": "Build and test a Java project using a Gradle wrapper script.", - "iconName": "gradle", - "categories": ["Java", "Gradle"] -} \ No newline at end of file +{ + "name": "Java with Gradle", + "description": "Build and test a Java project using a Gradle wrapper script.", + "iconName": "gradle", + "categories": ["Java", "Gradle"] +} diff --git a/ci/properties/haskell.properties.json b/ci/properties/haskell.properties.json index ae71a60..2dedbf2 100644 --- a/ci/properties/haskell.properties.json +++ b/ci/properties/haskell.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Haskell", - "description": "Build and test a Haskell project with Cabal.", - "iconName": "haskell", - "categories": ["Haskell"] -} \ No newline at end of file +{ + "name": "Haskell", + "description": "Build and test a Haskell project with Cabal.", + "iconName": "haskell", + "categories": ["Haskell"] +} diff --git a/ci/properties/jekyll.properties.json b/ci/properties/jekyll.properties.json index c97835a..38cc6cd 100644 --- a/ci/properties/jekyll.properties.json +++ b/ci/properties/jekyll.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Jekyll", - "description": "Package a Jekyll site using the jekyll/builder Docker image.", - "iconName": "jekyll", - "categories": ["HTML"] -} \ No newline at end of file +{ + "name": "Jekyll", + "description": "Package a Jekyll site using the jekyll/builder Docker image.", + "iconName": "jekyll", + "categories": ["HTML"] +} diff --git a/ci/properties/maven.properties.json b/ci/properties/maven.properties.json index bcc8430..e322d04 100644 --- a/ci/properties/maven.properties.json +++ b/ci/properties/maven.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Java with Maven", - "description": "Build and test a Java project with Apache Maven.", - "iconName": "maven", - "categories": ["Java", "Maven"] -} \ No newline at end of file +{ + "name": "Java with Maven", + "description": "Build and test a Java project with Apache Maven.", + "iconName": "maven", + "categories": ["Java", "Maven"] +} diff --git a/ci/properties/node.js.properties.json b/ci/properties/node.js.properties.json index 99a79bc..6ab4c53 100644 --- a/ci/properties/node.js.properties.json +++ b/ci/properties/node.js.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Node.js", - "description": "Build and test a Node.js project with npm.", - "iconName": "nodejs", - "categories": ["JavaScript", "Node", "Npm"] -} \ No newline at end of file +{ + "name": "Node.js", + "description": "Build and test a Node.js project with npm.", + "iconName": "nodejs", + "categories": ["JavaScript", "Node", "Npm"] +} diff --git a/ci/properties/python-app.properties.json b/ci/properties/python-app.properties.json index cdf0330..34e4a57 100644 --- a/ci/properties/python-app.properties.json +++ b/ci/properties/python-app.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Python application", - "description": "Create and test a Python application.", - "iconName": "python", - "categories": ["Python"] -} \ No newline at end of file +{ + "name": "Python application", + "description": "Create and test a Python application.", + "iconName": "python", + "categories": ["Python"] +} diff --git a/ci/properties/python-package.properties.json b/ci/properties/python-package.properties.json index 4b3a8da..4e09d40 100644 --- a/ci/properties/python-package.properties.json +++ b/ci/properties/python-package.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Python package", - "description": "Create and test a Python package on multiple Python versions.", - "iconName": "python", - "categories": ["Python"] -} \ No newline at end of file +{ + "name": "Python package", + "description": "Create and test a Python package on multiple Python versions.", + "iconName": "python", + "categories": ["Python"] +} diff --git a/ci/properties/ruby.properties.json b/ci/properties/ruby.properties.json index df74931..904f12f 100644 --- a/ci/properties/ruby.properties.json +++ b/ci/properties/ruby.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Ruby", - "description": "Build and test a Ruby project with Rake.", - "iconName": "ruby", - "categories": ["Ruby"] -} \ No newline at end of file +{ + "name": "Ruby", + "description": "Build and test a Ruby project with Rake.", + "iconName": "ruby", + "categories": ["Ruby"] +} diff --git a/ci/properties/rust.properties.json b/ci/properties/rust.properties.json index 6f4f967..3a6dc02 100644 --- a/ci/properties/rust.properties.json +++ b/ci/properties/rust.properties.json @@ -1,6 +1,6 @@ -{ - "name": "Rust", - "description": "Build and test a Rust project with Cargo.", - "iconName": "rust", - "categories": ["Rust"] +{ + "name": "Rust", + "description": "Build and test a Rust project with Cargo.", + "iconName": "rust", + "categories": ["Rust"] } \ No newline at end of file diff --git a/ci/python-app.yml b/ci/python-app.yml index 1519cec..25a32ef 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -1,37 +1,37 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python application - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pip install pytest - pytest +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python application + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + pip install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pip install pytest + pytest diff --git a/ci/python-package.yml b/ci/python-package.yml index 846b2f9..0d78aa5 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -1,40 +1,40 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python package - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.5, 3.6, 3.7, 3.8] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pip install pytest - pytest +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + pip install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pip install pytest + pytest diff --git a/ci/ruby.yml b/ci/ruby.yml index 302d148..6415d43 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -1,24 +1,24 @@ -name: Ruby - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - name: Build and test with Rake - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec rake +name: Ruby + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Build and test with Rake + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + bundle exec rake diff --git a/ci/rust.yml b/ci/rust.yml index 468e4bf..6738b0b 100644 --- a/ci/rust.yml +++ b/ci/rust.yml @@ -1,19 +1,19 @@ -name: Rust - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose +name: Rust + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From 4411c79d206d9dfa102cb0b414f34cb4f0a4ad3a Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Tue, 24 Mar 2020 11:38:16 -0400 Subject: [PATCH 053/118] 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 1355c6f4395278d1c29cf00e49a4475328534ea0 Mon Sep 17 00:00:00 2001 From: Bernd Verst Date: Tue, 31 Mar 2020 11:26:59 -0700 Subject: [PATCH 054/118] Adds App Service documentation references This workflow assumes an App Service web app has already been created and that a user knows how to obtain the desired input values. This cannot be assumed. Therefore I have included references to the relevant documentation. --- ci/azure.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/azure.yml b/ci/azure.yml index dbb46b6..a638c4c 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -1,8 +1,12 @@ # This workflow will build and push a node.js application to an Azure Web App when a release is created. # +# This workflow assumes you have already created the target Azure App Service web app. +# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan +# # To configure this workflow: # # 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. +# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret # # 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). # From 89a7d6d6fdf9d7efc48eef51de099dbc3f651328 Mon Sep 17 00:00:00 2001 From: Fumiaki Kinoshita Date: Thu, 13 Feb 2020 16:24:06 +0900 Subject: [PATCH 055/118] ci/haskell.yml: properly build dependencies, tests and benchmarks --- ci/haskell.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/haskell.yml b/ci/haskell.yml index 3952e56..fc6d8b3 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -20,10 +20,8 @@ jobs: - name: Install dependencies run: | cabal update - cabal install --only-dependencies --enable-tests + cabal build --only-dependencies --enable-tests --enable-benchmarks - name: Build - run: | - cabal configure --enable-tests - cabal build + run: cabal build --enable-tests --enable-benchmarks all - name: Run tests - run: cabal test + run: cabal test all \ No newline at end of file From 8635fcacca0bc15706d4bf992b30b95fb8aa0062 Mon Sep 17 00:00:00 2001 From: Fumiaki Kinoshita Date: Wed, 26 Feb 2020 20:23:25 +0900 Subject: [PATCH 056/118] ci/haskell.yml: cache dependencies --- ci/haskell.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ci/haskell.yml b/ci/haskell.yml index fc6d8b3..4bc2d16 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -17,6 +17,19 @@ jobs: with: ghc-version: '8.8.2' cabal-version: '3.0' + + - name: Cache + uses: actions/cache@v1 + env: + cache-name: cache-cabal + with: + path: ~/.cabal + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install dependencies run: | cabal update @@ -24,4 +37,4 @@ jobs: - name: Build run: cabal build --enable-tests --enable-benchmarks all - name: Run tests - run: cabal test all \ No newline at end of file + run: cabal test all From 20088f94566da626b035b3c3008f0d7abb60e29c Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 3 Apr 2020 15:14:18 +0100 Subject: [PATCH 057/118] Update pull_request_template.md --- .github/pull_request_template.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 51f963e..3d6833a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,15 +5,23 @@ Thank you for sending in this pull request. Please make sure you take a look at In the workflow and properties files: +- [ ] The workflow filename of CI workflows should be the name of the language or platform, in lower case. Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET"). The workflow filename of publishing workflows should be the name of the language or platform, in lower case, followed by "-publish". - [ ] Includes a matching `ci/properties/*.properties.json` file. -- [ ] Use title case for the names of workflows and steps, for example "Run tests". +- [ ] 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 `push`. -- [ ] Packaging workflows should run on `release` with `types: [created]`. +- [ ] CI workflows should run on `push` to `branches: [ master ]` and `pull_request` to `branches: [ master ]`. Packaging workflows should run on `release` with `types: [ created ]`. Some general notes: -- [ ] Does not use an Action that isn't in the `actions` organization. -- [ ] Does not send data to any 3rd party service except for the purposes of installing dependencies. -- [ ] Does not use a paid service or product. +- [ ] This workflow must use only actions produced by GitHub or the langauge or ecosystem that the workflow supports. + * [ ] 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 include the following comment at the top of the workflow file: + ``` + # This workflow uses actions that are not certified by GitHub. + # They are provided by a third-party and are governed by + # separate terms of service, privacy policy, and support + # documentation. + ``` +- [ ] This workflow must not send data to any 3rd party service except for the purposes of installing dependencies. +- [ ] This workflow must not use a paid service or product. From ccaa3fe1686e3743d7923f98dde3dcd63ca8c474 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 3 Apr 2020 15:20:55 +0100 Subject: [PATCH 058/118] Update pull_request_template.md Formatting updates. --- .github/pull_request_template.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3d6833a..2e390ab 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,18 +5,22 @@ Thank you for sending in this pull request. Please make sure you take a look at In the workflow and properties files: -- [ ] The workflow filename of CI workflows should be the name of the language or platform, in lower case. Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET"). The workflow filename of publishing workflows should be the name of the language or platform, in lower case, followed by "-publish". +- [ ] The workflow filename of CI workflows should be the name of the language or platform, in lower case. Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET"). + + The workflow filename of publishing workflows should be the name of the language or platform, in lower case, followed by "-publish". - [ ] Includes a matching `ci/properties/*.properties.json` file. - [ ] 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 ]`. Packaging workflows should run on `release` with `types: [ created ]`. +- [ ] CI workflows should run on `push` to `branches: [ master ]` and `pull_request` to `branches: [ master ]`. + + Packaging workflows should run on `release` with `types: [ created ]`. Some general notes: -- [ ] This workflow must use only actions produced by GitHub or the langauge or ecosystem that the workflow supports. - * [ ] 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 include the following comment at the top of the workflow file: +- [ ] 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 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 51163e48538145b208c4c68d53c3af0d1ac61151 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Mon, 6 Apr 2020 13:02:13 +0100 Subject: [PATCH 059/118] 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 2e390ab..35bfb44 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,7 +20,7 @@ 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 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 2ac9c51b545f361a3976809ec127c67f145cfb15 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Mon, 6 Apr 2020 10:12:17 -0400 Subject: [PATCH 060/118] Added starter workflow for desktop apps. --- ci/desktop.yml | 109 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 ci/desktop.yml diff --git a/ci/desktop.yml b/ci/desktop.yml new file mode 100644 index 0000000..83ff99a --- /dev/null +++ b/ci/desktop.yml @@ -0,0 +1,109 @@ +# This workflow will build, test and create app packages for a Wpf project built on Net Core. +# +# To configure this workflow: +# +# 1. Configure environment variables +# 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 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 file. +# +# $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 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." +# See "Build the Windows Application Packaging project" below to see how the secret is used. +# +# For more information on GitHub Actions, refer to https://github.com/features/actions +# 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: Build and publish a desktop application + +# Trigger on every master branch push and pull request +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + + build: + + strategy: + matrix: + configuration: [Debug, Release] + + runs-on: windows-latest + + env: + Appx_Bundle: Always # Creates an .msixbundle/.appxbundle with the .msix/.appx files for the platform specified. + App_Packages_Directory: AppPackages # The name of the directory that will contain the application packages. The default is "AppPackages." + Appx_Bundle_Platforms: x86|x64 # Include x86 and x64 platforms in the bundle. Possible values: x86|x64|ARM + Appx_Package_Build_Mode: StoreUpload # Generates the .msixupload/.appxupload file and the _Test folder for sideloading. + Signing_Certificate: GitHubActionsDemo.pfx # The name of the .pfx that will be created by decoding the Base 64 secret and consumed during the packaging step. + Solution_Name: your-solution-name # Replace with your solution name, i.e. MyWpfApp.sln. + Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. + Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. + Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.100 + + # Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.0 + + # Test + - name: Execute Unit Tests + run: dotnet test $env:Test_Project_Path + + # Restore the Wpf application to populate the obj folder with RuntimeIdentifiers + - name: Restore the Wpf application + run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration + env: + Configuration: ${{ matrix.configuration }} + + # Decode the Base64 encoded Pfx + - name: Decode the Pfx + run: | + $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") + $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath $env:Signing_Certificate + [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) + + # Create the app package by building and packaging the Windows Application Packaging project + - name: Create the App Package + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=$env:Signing_Certificate /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} + env: + Configuration: ${{ matrix.configuration }} + + # Remove the .pfx + - name: Remove the .pfx + run: Remove-Item -path $env:Wap_Project_Directory\$env:Signing_Certificate + + # Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact + - name: Upload build artifacts + uses: actions/upload-artifact@v1 + with: + name: MSIX Package + path: ${{ env.Wap_Project_Directory }}\${{ env.App_Packages_Directory }} From 0c7710ef26500dbfaa7a5bd2e8028b765130b2b6 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Mon, 6 Apr 2020 10:29:23 -0400 Subject: [PATCH 061/118] Added the properties file and updated the workflow file to conform to PR specifications. --- ci/desktop.yml | 27 +++++++++++++-------------- ci/properties/desktop.properties.json | 6 ++++++ 2 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 ci/properties/desktop.properties.json diff --git a/ci/desktop.yml b/ci/desktop.yml index 83ff99a..4a2b0a5 100644 --- a/ci/desktop.yml +++ b/ci/desktop.yml @@ -1,4 +1,6 @@ -# This workflow will build, test and create app packages for a Wpf project built on Net Core. +# This workflow will build, test and package a Wpf desktop application built on .NET Core. +# To learn how to migrate your existing WPF 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: # @@ -26,16 +28,13 @@ # 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: Build and publish a desktop application +name: Build, deploy and publish a Wpf desktop application -# Trigger on every master branch push and pull request on: push: - branches: - - master + branches: [ master ] pull_request: - branches: - - master + branches: [ master ] jobs: @@ -68,14 +67,14 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.100 + dotnet-version: 3.1.101 # Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.0.0 # Test - - name: Execute Unit Tests + - name: Execute unit tests run: dotnet test $env:Test_Project_Path # Restore the Wpf application to populate the obj folder with RuntimeIdentifiers @@ -84,21 +83,21 @@ jobs: env: Configuration: ${{ matrix.configuration }} - # Decode the Base64 encoded Pfx - - name: Decode the Pfx + # Decode the base 64 encoded pfx and save the Signing_Certificate + - name: Decode the pfx run: | $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath $env:Signing_Certificate [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) # Create the app package by building and packaging the Windows Application Packaging project - - name: Create the App Package + - name: Create the app package run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=$env:Signing_Certificate /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} env: Configuration: ${{ matrix.configuration }} - # Remove the .pfx - - name: Remove the .pfx + # Remove the pfx + - name: Remove the pfx run: Remove-Item -path $env:Wap_Project_Directory\$env:Signing_Certificate # Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact diff --git a/ci/properties/desktop.properties.json b/ci/properties/desktop.properties.json new file mode 100644 index 0000000..e04727e --- /dev/null +++ b/ci/properties/desktop.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Test and publish a Wpf application", + "description": "Build, test and publish a Wpf application built on .NET Core.", + "iconName": "Wpf", + "categories": ["C#", "Visual Basic", "WPF", ".NET"] +} \ No newline at end of file From a2adc6fc7388fe22ccc1b2a05896585ecab5fbf1 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Mon, 6 Apr 2020 10:32:56 -0400 Subject: [PATCH 062/118] Updated files with name that conforms to PR recommendations. --- ci/desktop.yml | 2 +- ci/properties/desktop.properties.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/desktop.yml b/ci/desktop.yml index 4a2b0a5..4a06abf 100644 --- a/ci/desktop.yml +++ b/ci/desktop.yml @@ -28,7 +28,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: Build, deploy and publish a Wpf desktop application +name: Wpf .NET Core on: push: diff --git a/ci/properties/desktop.properties.json b/ci/properties/desktop.properties.json index e04727e..4a382a2 100644 --- a/ci/properties/desktop.properties.json +++ b/ci/properties/desktop.properties.json @@ -1,5 +1,5 @@ { - "name": "Test and publish a Wpf application", + "name": "Wpf .NET Core", "description": "Build, test and publish a Wpf application built on .NET Core.", "iconName": "Wpf", "categories": ["C#", "Visual Basic", "WPF", ".NET"] From 67ffe1ea7ac8dc746ead8838b1a233a36d586bb3 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 3 Apr 2020 20:24:59 +0200 Subject: [PATCH 063/118] Use ruby/setup-ruby for the Ruby starter workflow --- ci/ruby.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/ci/ruby.yml b/ci/ruby.yml index 6415d43..7a78b45 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -1,3 +1,10 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + name: Ruby on: @@ -7,18 +14,17 @@ on: branches: [ master ] jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6.x - - name: Build and test with Rake - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec rake + ruby-version: 2.6 + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake From 703084fb8c1a13fb8933c95a9ef500e12da4d2bf Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Tue, 7 Apr 2020 12:24:02 -0400 Subject: [PATCH 064/118] Renamed files and addressed PR feedback. --- ...s.json => wpf-dotnet-core.properties.json} | 0 ci/{desktop.yml => wpf-dotnet-core.yml} | 31 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) rename ci/properties/{desktop.properties.json => wpf-dotnet-core.properties.json} (100%) rename ci/{desktop.yml => wpf-dotnet-core.yml} (75%) diff --git a/ci/properties/desktop.properties.json b/ci/properties/wpf-dotnet-core.properties.json similarity index 100% rename from ci/properties/desktop.properties.json rename to ci/properties/wpf-dotnet-core.properties.json diff --git a/ci/desktop.yml b/ci/wpf-dotnet-core.yml similarity index 75% rename from ci/desktop.yml rename to ci/wpf-dotnet-core.yml index 4a06abf..a8241ab 100644 --- a/ci/desktop.yml +++ b/ci/wpf-dotnet-core.yml @@ -1,4 +1,4 @@ -# This workflow will build, test and package a Wpf desktop application built on .NET Core. +# This workflow will build, test and package a WPF desktop application built on .NET Core. # To learn how to migrate your existing WPF application to .NET Core, # refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework # @@ -11,7 +11,7 @@ # 2. Signing # 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 file. +# script to generate the output string. # # $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte # [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' @@ -28,7 +28,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: WPF .NET Core on: push: @@ -44,14 +44,10 @@ jobs: matrix: configuration: [Debug, Release] - runs-on: windows-latest + 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: - Appx_Bundle: Always # Creates an .msixbundle/.appxbundle with the .msix/.appx files for the platform specified. - App_Packages_Directory: AppPackages # The name of the directory that will contain the application packages. The default is "AppPackages." - Appx_Bundle_Platforms: x86|x64 # Include x86 and x64 platforms in the bundle. Possible values: x86|x64|ARM - Appx_Package_Build_Mode: StoreUpload # Generates the .msixupload/.appxupload file and the _Test folder for sideloading. - Signing_Certificate: GitHubActionsDemo.pfx # The name of the .pfx that will be created by decoding the Base 64 secret and consumed during the packaging step. Solution_Name: your-solution-name # Replace with your solution name, i.e. MyWpfApp.sln. Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. @@ -73,12 +69,12 @@ jobs: - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.0.0 - # Test + # Execute all unit tests in the solution - name: Execute unit tests - run: dotnet test $env:Test_Project_Path + run: dotnet test - # Restore the Wpf application to populate the obj folder with RuntimeIdentifiers - - name: Restore the Wpf application + # Restore the WPF application to populate the obj folder with RuntimeIdentifiers + - name: Restore the WPF application run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration env: Configuration: ${{ matrix.configuration }} @@ -87,13 +83,16 @@ jobs: - name: Decode the pfx run: | $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") - $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath $env:Signing_Certificate + $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) # Create the app package by building and packaging the Windows Application Packaging project - name: Create the app package - run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=$env:Signing_Certificate /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} env: + Appx_Bundle: Always + Appx_Bundle_Platforms: x86|x64 + Appx_Package_Build_Mode: StoreUpload Configuration: ${{ matrix.configuration }} # Remove the pfx @@ -105,4 +104,4 @@ jobs: uses: actions/upload-artifact@v1 with: name: MSIX Package - path: ${{ env.Wap_Project_Directory }}\${{ env.App_Packages_Directory }} + path: ${{ env.Wap_Project_Directory }}\AppPackages From a3f957729c2f2ab206a0c109318258edb4f6bf32 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Wed, 8 Apr 2020 10:17:52 -0400 Subject: [PATCH 065/118] Responded to PR feedback. Added commit hash to microsoft setup action. --- ci/wpf-dotnet-core.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/ci/wpf-dotnet-core.yml b/ci/wpf-dotnet-core.yml index a8241ab..80ec3e5 100644 --- a/ci/wpf-dotnet-core.yml +++ b/ci/wpf-dotnet-core.yml @@ -1,27 +1,35 @@ -# This workflow will build, test and package a WPF desktop application built on .NET Core. +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow will build, test and package a WPF desktop application +# built on .NET Core. # To learn how to migrate your existing WPF 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: # # 1. Configure environment variables -# GitHub sets default environment variables for every workflow run. Replace the variables relative to your -# project in the "env" section below. +# 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 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. +# 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 this workflow, refer -# to https://github.com/microsoft/github-actions-for-desktop-apps#signing +# 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 +# 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." +# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". # See "Build the Windows Application Packaging project" below to see how the secret is used. # # For more information on GitHub Actions, refer to https://github.com/features/actions @@ -65,9 +73,9 @@ jobs: with: dotnet-version: 3.1.101 - # Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.0 + uses: microsoft/setup-msbuild@2008f912f56e61277eefaac6d1888b750582aa16 # Execute all unit tests in the solution - name: Execute unit tests From 29e8a67beb08258b8b7f2baa5778c2386169d1e9 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Wed, 8 Apr 2020 14:50:15 -0400 Subject: [PATCH 066/118] Fixed case of wpf --- 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 4a382a2..56eea90 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", + "name": "WPF .NET Core", "description": "Build, test and publish a Wpf application built on .NET Core.", - "iconName": "Wpf", + "iconName": "WPF", "categories": ["C#", "Visual Basic", "WPF", ".NET"] } \ No newline at end of file From 06b21b84fd80dbe7d29a1ae3656aaf5a9f662efc Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 9 Apr 2020 08:41:42 +0100 Subject: [PATCH 067/118] python: gracefully handle no requirements.txt If there's no requirements.txt then there's no need to `pip install` them. --- ci/python-app.yml | 5 ++--- ci/python-package.yml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ci/python-app.yml b/ci/python-app.yml index 25a32ef..900e442 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -23,15 +23,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | - pip install flake8 # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pip install pytest pytest diff --git a/ci/python-package.yml b/ci/python-package.yml index 0d78aa5..b425371 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -26,15 +26,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | - pip install flake8 # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pip install pytest pytest From 9dd8f4e44a04e7ff304cf172242a85e4246de947 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 9 Apr 2020 19:59:10 +0200 Subject: [PATCH 068/118] Use a full commit sha as required by GitHub for 3rd-party actions --- ci/ruby.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/ruby.yml b/ci/ruby.yml index 7a78b45..76c166e 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -21,7 +21,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 with: ruby-version: 2.6 - name: Install dependencies From acc6dd8232724fd642db26d1acf95e75cefcdcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Le=20Merdy?= <567637+seblm@users.noreply.github.com> Date: Mon, 13 Apr 2020 22:00:37 +0200 Subject: [PATCH 069/118] Add Scala icon --- ci/properties/scala.properties.json | 2 +- icons/scala.svg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 icons/scala.svg diff --git a/ci/properties/scala.properties.json b/ci/properties/scala.properties.json index d44e867..a92fc73 100644 --- a/ci/properties/scala.properties.json +++ b/ci/properties/scala.properties.json @@ -1,6 +1,6 @@ { "name": "Scala", "description": "Build and test a Scala project with SBT.", - "iconName": "blank", + "iconName": "scala", "categories": ["Scala", "Java"] } diff --git a/icons/scala.svg b/icons/scala.svg new file mode 100644 index 0000000..80c5b99 --- /dev/null +++ b/icons/scala.svg @@ -0,0 +1 @@ + From 6c7202a657202b964444706f1f50fa283650f8cf Mon Sep 17 00:00:00 2001 From: Jai Govindani Date: Tue, 14 Apr 2020 18:10:05 +0700 Subject: [PATCH 070/118] Add `Test` step Testing in Go is a first-class citizen, any starter workflow should also have a Test step. --- ci/go.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/go.yml b/ci/go.yml index b66c0d7..0a49300 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -32,3 +32,6 @@ jobs: - name: Build run: go build -v . + + - name: Test + run: go test -v . From 2720260ff74063245fdad673b3424e0146100997 Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Thu, 16 Apr 2020 19:01:39 -0400 Subject: [PATCH 071/118] update setup-go to v2 --- ci/go.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/go.yml b/ci/go.yml index 0a49300..d31e87f 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -13,10 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.13 - uses: actions/setup-go@v1 + - name: Set up Go 1.x + uses: actions/setup-go@v2 with: - go-version: 1.13 + go-version: ^1.13 id: go - name: Check out code into the Go module directory From 8dc9fb3b3a090b51a20fde54733ead3cbf728e40 Mon Sep 17 00:00:00 2001 From: sineverba Date: Mon, 20 Apr 2020 08:54:47 +0200 Subject: [PATCH 072/118] Fix image name as env var --- 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 21f5bd1..1a1805f 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@v2 - name: Build image - run: docker build . --file Dockerfile --tag image + run: docker build . --file Dockerfile --tag $IMAGE_NAME - name: Log into registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin From 9bc2c5c75e29554d9c5486c15d1cb8db5e478088 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 26 Apr 2020 19:01:56 +0100 Subject: [PATCH 073/118] node: remove CI=true environment variable The CI environment variable is now set by GitHub Actions directly. No need to set it in the workflow. --- ci/node.js.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/node.js.yml b/ci/node.js.yml index 4390e93..e772a1c 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -27,5 +27,3 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test - env: - CI: true From 0254a244d2bb8562c48a66a9aed2d9b1667c38dc Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 24 Apr 2020 23:48:32 -0400 Subject: [PATCH 074/118] 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 3c5440479dcff08bd195911245b9b8454417c9f6 Mon Sep 17 00:00:00 2001 From: John Bohannon Date: Tue, 28 Apr 2020 14:11:34 -0400 Subject: [PATCH 075/118] Create terraform.yml --- ci/terraform.yml | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 ci/terraform.yml diff --git a/ci/terraform.yml b/ci/terraform.yml new file mode 100644 index 0000000..148f2e2 --- /dev/null +++ b/ci/terraform.yml @@ -0,0 +1,90 @@ +# 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. +# +# Documentation for `hashicorp/setup-terraform` is located here: https://github.com/hashicorp/setup-terraform +# +# To use this workflow, you will need to complete the following setup steps. +# +# 1. Create a `main.tf` file in the root of this repository with the `remote` backend and one or more resources defined. +# Example `main.tf`: +# # The configuration for the `remote` backend. +# terraform { +# backend "remote" { +# # The name of your Terraform Cloud organization. +# organization = "example-organization" +# +# # The name of the Terraform Cloud workspace to store Terraform state files in. +# workspaces { +# name = "example-workspace" +# } +# } +# } +# +# # An example resource that does nothing. +# resource "null_resource" "example" { +# triggers = { +# value = "A example resource that does nothing!" +# } +# } +# +# +# 2. Generate a Terraform Cloud user API token and store it as a GitHub secret (e.g. TF_API_TOKEN) on this repository. +# Documentation: +# - https://www.terraform.io/docs/cloud/users-teams-organizations/api-tokens.html +# - https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets +# +# 3. Reference the GitHub secret in step using the `hashicorp/setup-terraform` GitHub Action. +# Example: +# - name: Setup Terraform +# uses: hashicorp/setup-terraform@v1 +# with: +# cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} + +name: 'Terraform' + +on: + push: + branches: + - master + pull_request: + +jobs: + terraform: + name: 'Terraform' + runs-on: ubuntu-latest + + # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest + defaults: + run: + shell: bash + + # Checkout the repository to the GitHub Actions runner + steps: + - 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 + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + with: + cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} + + # Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc. + - name: Terraform Init + run: terraform init + + # Checks that all Terraform configuration files adhere to a canonical format + - name: Terraform Format + run: terraform fmt -check + + # 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 + # 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' + run: terraform apply -auto-approve From 20e3ada1882119804c0694656a1af1a0cca6a12b Mon Sep 17 00:00:00 2001 From: John Bohannon Date: Tue, 28 Apr 2020 14:28:36 -0400 Subject: [PATCH 076/118] Create terraform.properties.json --- ci/properties/terraform.properties.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ci/properties/terraform.properties.json diff --git a/ci/properties/terraform.properties.json b/ci/properties/terraform.properties.json new file mode 100644 index 0000000..34fa16e --- /dev/null +++ b/ci/properties/terraform.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Terraform", + "description": "Set up Terraform CLI in your GitHub Actions workflow.", + "iconName": "terraform", + "categories": null +} From ad5ca30863406c2318b308371ad2583fbe7ccdf5 Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Tue, 28 Apr 2020 14:50:43 -0400 Subject: [PATCH 077/118] Updated the Wpf dotnetcore icon to dotnetcore --- ci/properties/wpf-dotnet-core.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/wpf-dotnet-core.properties.json b/ci/properties/wpf-dotnet-core.properties.json index 56eea90..f43ea35 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.", - "iconName": "WPF", + "iconName": "dotnetcore", "categories": ["C#", "Visual Basic", "WPF", ".NET"] } \ No newline at end of file From adc9b70b375feb2636fa334cc0a0ea9c4347e33f Mon Sep 17 00:00:00 2001 From: John Bohannon Date: Tue, 28 Apr 2020 14:59:11 -0400 Subject: [PATCH 078/118] Add files via upload --- icons/terraform.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 icons/terraform.svg diff --git a/icons/terraform.svg b/icons/terraform.svg new file mode 100644 index 0000000..718fc0f --- /dev/null +++ b/icons/terraform.svg @@ -0,0 +1 @@ +terraform-icon logo \ No newline at end of file From d5e8e87192c1090f4e9c4e2763bafaf138064ce7 Mon Sep 17 00:00:00 2001 From: mingshun Date: Wed, 29 Apr 2020 09:43:42 +0800 Subject: [PATCH 079/118] Add Tencent Cloud icon --- icons/tencentcloud.svg | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 icons/tencentcloud.svg diff --git a/icons/tencentcloud.svg b/icons/tencentcloud.svg new file mode 100644 index 0000000..0dad590 --- /dev/null +++ b/icons/tencentcloud.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + From 03bcd683793b6285482a83f5c16c49ad11143bad Mon Sep 17 00:00:00 2001 From: mingshun Date: Wed, 29 Apr 2020 09:49:34 +0800 Subject: [PATCH 080/118] Rename workflow to be the platform --- ci/properties/tencent.properties.json | 2 +- ci/tencent.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json index d93a25e..1399885 100644 --- a/ci/properties/tencent.properties.json +++ b/ci/properties/tencent.properties.json @@ -1,5 +1,5 @@ { - "name": "Build and Deploy to TKE", + "name": "Tencent Kubernetes Engine", "description": "Build a Docker container, publish it to TKE Registry, and deploy to TKE cluster.", "iconName": "tencentcloud", "categories": ["Dockerfile"] diff --git a/ci/tencent.yml b/ci/tencent.yml index 8b937bc..308a1ee 100644 --- a/ci/tencent.yml +++ b/ci/tencent.yml @@ -13,7 +13,7 @@ # # 3. Change the values for the TKE_IMAGE_URL, TKE_REGION, TKE_CLUSTER_ID and DEPLOYMENT_NAME environment variables (below). -name: Build and Deploy to TKE +name: Tencent Kubernetes Engine on: push: From e5ca8224887e7649b270def58205014b53169e57 Mon Sep 17 00:00:00 2001 From: mingshun Date: Wed, 29 Apr 2020 10:00:35 +0800 Subject: [PATCH 081/118] Change the event that the workflow --- ci/tencent.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/tencent.yml b/ci/tencent.yml index 308a1ee..e0c0a82 100644 --- a/ci/tencent.yml +++ b/ci/tencent.yml @@ -16,9 +16,8 @@ name: Tencent Kubernetes Engine on: - push: - branches: - - master + release: + types: [created] # Environment variables available to all jobs and steps in this workflow env: From c411e74e2305816ff2042179011a265f7574bbd7 Mon Sep 17 00:00:00 2001 From: mingshun Date: Wed, 29 Apr 2020 10:02:53 +0800 Subject: [PATCH 082/118] Modify workflow description --- ci/properties/tencent.properties.json | 2 +- ci/tencent.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json index 1399885..8bbf29f 100644 --- a/ci/properties/tencent.properties.json +++ b/ci/properties/tencent.properties.json @@ -1,6 +1,6 @@ { "name": "Tencent Kubernetes Engine", - "description": "Build a Docker container, publish it to TKE Registry, and deploy to TKE cluster.", + "description": "This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE).", "iconName": "tencentcloud", "categories": ["Dockerfile"] } diff --git a/ci/tencent.yml b/ci/tencent.yml index e0c0a82..2d4ad03 100644 --- a/ci/tencent.yml +++ b/ci/tencent.yml @@ -1,4 +1,4 @@ -# This workflow will build a docker container, publish it to TKE Registry, and deploy it to TKE. +# This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE). # # To configure this workflow: # From 782ef792562f002c820e2ec1e439990801f2aba1 Mon Sep 17 00:00:00 2001 From: mingshun Date: Thu, 30 Apr 2020 11:08:09 +0800 Subject: [PATCH 083/118] Update tencentcloud icon --- icons/tencentcloud.svg | 72 +++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/icons/tencentcloud.svg b/icons/tencentcloud.svg index 0dad590..af729a4 100644 --- a/icons/tencentcloud.svg +++ b/icons/tencentcloud.svg @@ -1,43 +1,29 @@ - - - - - - - - - - - - - - - - - - - - + + + + 矩形 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 89ffdad1157564857ca95ddc12c985488dec49aa Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 30 Apr 2020 16:31:20 -0700 Subject: [PATCH 084/118] Set categories to `null` to be in sync with other workflows --- ci/properties/tencent.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json index 8bbf29f..b3d9d3f 100644 --- a/ci/properties/tencent.properties.json +++ b/ci/properties/tencent.properties.json @@ -2,5 +2,5 @@ "name": "Tencent Kubernetes Engine", "description": "This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE).", "iconName": "tencentcloud", - "categories": ["Dockerfile"] + "categories": null } From 951dfd0da3eea05f7a3e56adebf433243d15f37f Mon Sep 17 00:00:00 2001 From: Edward Skrod Date: Fri, 1 May 2020 06:56:47 -0400 Subject: [PATCH 085/118] 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 4931fda2f655ab7cee8622c3285269814e1370e8 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Fri, 1 May 2020 23:46:47 +0700 Subject: [PATCH 086/118] PHP: Remove deprectated composer --no-suggest From Composer v2, `--no-suggest` option is removed: https://php.watch/articles/composer-2 --- ci/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/php.yml b/ci/php.yml index 9d1b435..989deb2 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -18,7 +18,7 @@ jobs: run: composer validate - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest + run: composer install --prefer-dist --no-progress # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" # Docs: https://getcomposer.org/doc/articles/scripts.md From f543db49dbe97d4ae5d508a05dfb9f6e630227a7 Mon Sep 17 00:00:00 2001 From: Tim Dorr Date: Fri, 1 May 2020 18:53:57 -0400 Subject: [PATCH 087/118] 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 088/118] 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 089/118] 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 090/118] 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 091/118] 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 092/118] 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 093/118] 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 094/118] 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 095/118] 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 096/118] 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 097/118] 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 098/118] 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 099/118] 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 100/118] 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 101/118] 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 102/118] 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 103/118] 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 104/118] 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 105/118] 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 106/118] =?UTF-8?q?Don=E2=80=99t=20fail=20if=20no=20change?= =?UTF-8?q?s?= 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 107/118] 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 108/118] 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 109/118] 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 110/118] 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 111/118] 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 112/118] 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 113/118] 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 114/118] 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 115/118] 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 116/118] 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 117/118] 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 118/118] 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') }}