From 99de2a93da8a1f1caeb7dde858c3fcd54365d64d Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Mon, 7 Oct 2019 10:10:49 -0400 Subject: [PATCH 01/17] Add R starter workflow This adds a workflow for [R packages](https://www.r-project.org/). It uses a [setup-r](https://github.com/r-lib/actions/tree/master/setup-r) action and two R packages - [remotes](https://remotes.r-lib.org/) - to install the R package dependencies - [rcmdcheck](https://github.com/r-lib/rcmdcheck) - to run and format the output of the package checking tool used in the R ecosystem. --- ci/properties/r.properties.json | 6 ++++++ ci/r.yml | 23 +++++++++++++++++++++++ icons/r.svg | 14 ++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ci/properties/r.properties.json create mode 100644 ci/r.yml create mode 100644 icons/r.svg diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json new file mode 100644 index 0000000..a9c6c61 --- /dev/null +++ b/ci/properties/r.properties.json @@ -0,0 +1,6 @@ +{ + "name": "R package", + "description": "Create and test an R package on multiple R versions.", + "iconName": "R", + "categories": ["R"] +} diff --git a/ci/r.yml b/ci/r.yml new file mode 100644 index 0000000..fb959bf --- /dev/null +++ b/ci/r.yml @@ -0,0 +1,23 @@ +name: R + +on: [push] + +jobs: + build: + + runs-on: macOS-latest + strategy: + max-parallel: 4 + matrix: + r-version: [3.5.3, 3.6.1] + + steps: + - uses: actions/checkout@v1 + - name: Set up R ${{ matrix.r-version }} + uses: rlib/actions/setup-r@v1 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: Rscript -e "install.packages(c('remotes', 'rcmdcheck'))" -e "remotes::install_deps(dependencies = TRUE)" + - name: Check + run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')" diff --git a/icons/r.svg b/icons/r.svg new file mode 100644 index 0000000..78281f7 --- /dev/null +++ b/icons/r.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + From 4624b6ee62744ca391d05d29c1f4bee1f7e1e941 Mon Sep 17 00:00:00 2001 From: Vibhu Agarwal Date: Wed, 4 Mar 2020 19:31:12 +0530 Subject: [PATCH 02/17] Update python-publish.yml --- ci/python-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/python-publish.yml b/ci/python-publish.yml index d5f3859..a7438ff 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -22,6 +22,7 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine + pip install -r requirements.txt - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 1c2ed214e050c66dc35b215aa1353d5574e6c17b Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Thu, 16 Apr 2020 13:31:59 -0400 Subject: [PATCH 03/17] Update R workflow based on review feedback --- ci/r.yml | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/ci/r.yml b/ci/r.yml index fb959bf..cad232b 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -1,23 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# See https://github.com/r-lib/actions/tree/master/examples#readme for +# additional example workflows available for the R community. + name: R -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: - runs-on: macOS-latest strategy: - max-parallel: 4 matrix: - r-version: [3.5.3, 3.6.1] + r-version: [3.5, 3.6] steps: - - uses: actions/checkout@v1 - - name: Set up R ${{ matrix.r-version }} - uses: rlib/actions/setup-r@v1 - with: - r-version: ${{ matrix.r-version }} - - name: Install dependencies - run: Rscript -e "install.packages(c('remotes', 'rcmdcheck'))" -e "remotes::install_deps(dependencies = TRUE)" - - name: Check - run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')" + - uses: actions/checkout@v2 + - name: Set up R ${{ matrix.r-version }} + uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} From 9b42288206b387b1b6d78ae4156efbde99bdf882 Mon Sep 17 00:00:00 2001 From: Vibhu Agarwal Date: Tue, 26 May 2020 17:52:59 +0530 Subject: [PATCH 04/17] Update python-publish.yml --- ci/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/python-publish.yml b/ci/python-publish.yml index a7438ff..736fae8 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -22,7 +22,7 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine - pip install -r requirements.txt + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From dabe11f6f76a121ca74dc266524906e560959f06 Mon Sep 17 00:00:00 2001 From: Kenji Koshikawa Date: Thu, 2 Jul 2020 00:39:20 +0900 Subject: [PATCH 05/17] refs #573 Update deprecated for actions/setup-ruby to on gem-push.yml --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 08733c7..5f5f026 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: - version: 2.6.x + ruby-version: 2.6.x - name: Publish to GPR run: | From b79be1ea1a0e060ce090e4fc4206ab660ae0e6ad Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Tue, 7 Jul 2020 14:07:47 -0700 Subject: [PATCH 06/17] Add manually triggered workflow template --- ci/manual.yml | 30 ++++++++++++++++++++++++++++ ci/properties/manual.properties.json | 6 ++++++ 2 files changed, 36 insertions(+) create mode 100644 ci/manual.yml create mode 100644 ci/properties/manual.properties.json diff --git a/ci/manual.yml b/ci/manual.yml new file mode 100644 index 0000000..4a7131e --- /dev/null +++ b/ci/manual.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Person to greet' + # Default value if no value is explicitly provided + default: 'World' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + greet: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send greeting + run: echo "Hello ${{ github.event.inputs.name }}" \ No newline at end of file diff --git a/ci/properties/manual.properties.json b/ci/properties/manual.properties.json new file mode 100644 index 0000000..7a7d96f --- /dev/null +++ b/ci/properties/manual.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Manual workflow", + "description": "Simple workflow that is manually triggered.", + "iconName": "blank", + "categories": null +} From d84eed709f45f0278c3dd3a5e73bf06d243eaf61 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 9 Jul 2020 08:32:58 -0700 Subject: [PATCH 07/17] Move manual workflow template to automation category --- {ci => automation}/manual.yml | 0 {ci => automation}/properties/manual.properties.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {ci => automation}/manual.yml (100%) rename {ci => automation}/properties/manual.properties.json (79%) diff --git a/ci/manual.yml b/automation/manual.yml similarity index 100% rename from ci/manual.yml rename to automation/manual.yml diff --git a/ci/properties/manual.properties.json b/automation/properties/manual.properties.json similarity index 79% rename from ci/properties/manual.properties.json rename to automation/properties/manual.properties.json index 7a7d96f..f08cbc3 100644 --- a/ci/properties/manual.properties.json +++ b/automation/properties/manual.properties.json @@ -2,5 +2,5 @@ "name": "Manual workflow", "description": "Simple workflow that is manually triggered.", "iconName": "blank", - "categories": null + "categories": ["Automation"] } From 15e1039f3fe5847254a31771e973e73c73968eed Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 10:55:13 +0100 Subject: [PATCH 08/17] Include Bearer in GEM_HOST_API_KEY --- ci/gem-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 08733c7..25477c8 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -27,7 +27,7 @@ jobs: gem build *.gemspec gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: - GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}} + GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" OWNER: username - name: Publish to RubyGems @@ -39,4 +39,4 @@ jobs: gem build *.gemspec gem push *.gem env: - GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} + GEM_HOST_API_KEY: "Bearer ${{secrets.RUBYGEMS_AUTH_TOKEN}}" From 9e8735b0e6649465a5d3b699d544dc379120d797 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 11:12:02 +0100 Subject: [PATCH 09/17] Use ${{ github.repository_owner }} as OWNER --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 25477c8..21a0115 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -28,7 +28,7 @@ jobs: gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" - OWNER: username + OWNER: ${{ github.repository_owner }} - name: Publish to RubyGems run: | From 0ca3f2a990f9f73a0df51f686dd470fe36e5047f Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 11:15:29 +0100 Subject: [PATCH 10/17] Remove Bearer from printf .gem/credentials --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 21a0115..3f2ad50 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -23,7 +23,7 @@ jobs: mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials - printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials gem build *.gemspec gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: From bd169be472f61378e09e0c372c2fa3b1789b3d1a Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 10 Jul 2020 11:25:05 +0100 Subject: [PATCH 11/17] Use ruby-version instead of version This fixes warning: Input 'version' has been deprecated with message: The version property will not be supported after October 1, 2019. Use ruby-version instead --- ci/gem-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 3f2ad50..cc92e97 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: - version: 2.6.x + ruby-version: 2.6.x - name: Publish to GPR run: | From abf7f258d1d84c79ad067c704e069c8cf7d8d2d0 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Mon, 13 Jul 2020 12:12:41 -0700 Subject: [PATCH 12/17] Use $default-branch token --- ci/android.yml | 4 ++-- ci/ant.yml | 4 ++-- ci/blank.yml | 6 +++--- ci/c-cpp.yml | 4 ++-- ci/clojure.yml | 4 ++-- ci/crystal.yml | 4 ++-- ci/dart.yml | 4 ++-- ci/django.yml | 4 ++-- ci/docker-image.yml | 4 ++-- ci/docker-publish.yml | 8 ++++---- ci/dotnet-core-desktop.yml | 16 ++++++++-------- ci/dotnet-core.yml | 4 ++-- ci/elixir.yml | 6 +++--- ci/erlang.yml | 4 ++-- ci/gem-push.yml | 4 ++-- ci/go.yml | 4 ++-- ci/gradle.yml | 4 ++-- ci/haskell.yml | 4 ++-- ci/jekyll.yml | 4 ++-- ci/laravel.yml | 6 +++--- ci/maven.yml | 4 ++-- ci/node.js.yml | 4 ++-- ci/php.yml | 6 +++--- ci/python-app.yml | 4 ++-- ci/python-package.yml | 4 ++-- ci/ruby.yml | 4 ++-- ci/rust.yml | 4 ++-- ci/scala.yml | 4 ++-- ci/swift.yml | 4 ++-- ci/terraform.yml | 12 ++++++------ 30 files changed, 76 insertions(+), 76 deletions(-) diff --git a/ci/android.yml b/ci/android.yml index 7ec0147..c88c515 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -2,9 +2,9 @@ name: Android CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/ant.yml b/ci/ant.yml index efebba5..28fe6d0 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -5,9 +5,9 @@ name: Java CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/blank.yml b/ci/blank.yml index d6783e2..72f1f16 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -3,12 +3,12 @@ name: CI # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +# events but only for the $default-branch branch on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: diff --git a/ci/c-cpp.yml b/ci/c-cpp.yml index e323326..88d1497 100644 --- a/ci/c-cpp.yml +++ b/ci/c-cpp.yml @@ -2,9 +2,9 @@ name: C/C++ CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/clojure.yml b/ci/clojure.yml index 22bfe20..098918a 100644 --- a/ci/clojure.yml +++ b/ci/clojure.yml @@ -2,9 +2,9 @@ name: Clojure CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/crystal.yml b/ci/crystal.yml index ce9dbfc..6552afa 100644 --- a/ci/crystal.yml +++ b/ci/crystal.yml @@ -2,9 +2,9 @@ name: Crystal CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/dart.yml b/ci/dart.yml index 11e18c7..6e1b2e3 100644 --- a/ci/dart.yml +++ b/ci/dart.yml @@ -2,9 +2,9 @@ name: Dart CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/django.yml b/ci/django.yml index c806047..b9d5315 100644 --- a/ci/django.yml +++ b/ci/django.yml @@ -2,9 +2,9 @@ name: Django CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/docker-image.yml b/ci/docker-image.yml index e57d42a..78532a3 100644 --- a/ci/docker-image.yml +++ b/ci/docker-image.yml @@ -2,9 +2,9 @@ name: Docker Image CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: diff --git a/ci/docker-publish.yml b/ci/docker-publish.yml index 9e80e76..76756db 100644 --- a/ci/docker-publish.yml +++ b/ci/docker-publish.yml @@ -2,9 +2,9 @@ name: Docker on: push: - # Publish `master` as Docker `latest` image. + # Publish `$default-branch` as Docker `latest` image. branches: - - master + - $default-branch # Publish `v1.2.3` tags as releases. tags: @@ -56,7 +56,7 @@ jobs: - name: Push image run: | IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME - + # Change all uppercase to lowercase IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') @@ -67,7 +67,7 @@ jobs: [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest + [ "$VERSION" == "$default-branch" ] && VERSION=latest echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION diff --git a/ci/dotnet-core-desktop.yml b/ci/dotnet-core-desktop.yml index ed37b70..341576c 100644 --- a/ci/dotnet-core-desktop.yml +++ b/ci/dotnet-core-desktop.yml @@ -11,22 +11,22 @@ # To configure this workflow: # # 1. Configure environment variables -# GitHub sets default environment variables for every workflow run. +# GitHub sets default environment variables for every workflow run. # Replace the variables relative to your project in the "env" section below. -# +# # 2. Signing -# Generate a signing certificate in the Windows Application +# Generate a signing certificate in the Windows Application # Packaging Project or add an existing signing certificate to the project. # Next, use PowerShell to encode the .pfx file using Base64 encoding # by running the following Powershell script to generate the output string: -# +# # $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte # [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' # # Open the output file, SigningCertificate_Encoded.txt, and copy the # string inside. Then, add the string to the repo as a GitHub secret # and name it "Base64_Encoded_Pfx." -# For more information on how to configure your signing certificate for +# For more information on how to configure your signing certificate for # this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing # # Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". @@ -40,9 +40,9 @@ name: .NET Core Desktop on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: @@ -52,7 +52,7 @@ jobs: matrix: configuration: [Debug, Release] - runs-on: windows-latest # For a list of available runner types, refer to + runs-on: windows-latest # For a list of available runner types, refer to # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on env: diff --git a/ci/dotnet-core.yml b/ci/dotnet-core.yml index f734ea7..03958b6 100644 --- a/ci/dotnet-core.yml +++ b/ci/dotnet-core.yml @@ -2,9 +2,9 @@ name: .NET Core on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/elixir.yml b/ci/elixir.yml index 4b3e78f..76dd26d 100644 --- a/ci/elixir.yml +++ b/ci/elixir.yml @@ -2,10 +2,10 @@ name: Elixir CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] - + branches: [ $default-branch ] + jobs: build: diff --git a/ci/erlang.yml b/ci/erlang.yml index fd28497..25cb893 100644 --- a/ci/erlang.yml +++ b/ci/erlang.yml @@ -2,9 +2,9 @@ name: Erlang CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: diff --git a/ci/gem-push.yml b/ci/gem-push.yml index 08733c7..f9b64e8 100644 --- a/ci/gem-push.yml +++ b/ci/gem-push.yml @@ -2,9 +2,9 @@ name: Ruby Gem on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/go.yml b/ci/go.yml index d31e87f..3fa9348 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: diff --git a/ci/gradle.yml b/ci/gradle.yml index 58e1c59..4550f58 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -5,9 +5,9 @@ name: Java CI with Gradle on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/haskell.yml b/ci/haskell.yml index 4bc2d16..4c9a50c 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -2,9 +2,9 @@ name: Haskell CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/jekyll.yml b/ci/jekyll.yml index 64df081..9449a6e 100644 --- a/ci/jekyll.yml +++ b/ci/jekyll.yml @@ -2,9 +2,9 @@ name: Jekyll site CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/laravel.yml b/ci/laravel.yml index a895246..b32ad88 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -2,15 +2,15 @@ name: Laravel on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: laravel-tests: runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v2 - name: Copy .env diff --git a/ci/maven.yml b/ci/maven.yml index c8aeb3a..a46556a 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -5,9 +5,9 @@ name: Java CI with Maven on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/node.js.yml b/ci/node.js.yml index 673bd33..ce0cdcf 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/php.yml b/ci/php.yml index 839187e..5053b43 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -2,9 +2,9 @@ name: PHP Composer on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: @@ -16,7 +16,7 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate - + - name: Cache Composer packages id: composer-cache uses: actions/cache@v2 diff --git a/ci/python-app.yml b/ci/python-app.yml index c7f5067..3b3e6a6 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -5,9 +5,9 @@ name: Python application on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/python-package.yml b/ci/python-package.yml index f1abc2f..c4a1081 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -5,9 +5,9 @@ name: Python package on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/ruby.yml b/ci/ruby.yml index 76c166e..7f3bdd6 100644 --- a/ci/ruby.yml +++ b/ci/ruby.yml @@ -9,9 +9,9 @@ name: Ruby on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: test: diff --git a/ci/rust.yml b/ci/rust.yml index 3c13d1b..6c82c61 100644 --- a/ci/rust.yml +++ b/ci/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] env: CARGO_TERM_COLOR: always diff --git a/ci/scala.yml b/ci/scala.yml index f182d0c..96bfc70 100644 --- a/ci/scala.yml +++ b/ci/scala.yml @@ -2,9 +2,9 @@ name: Scala CI on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/swift.yml b/ci/swift.yml index 5dbdb4f..df062b5 100644 --- a/ci/swift.yml +++ b/ci/swift.yml @@ -2,9 +2,9 @@ name: Swift on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: diff --git a/ci/terraform.yml b/ci/terraform.yml index 148f2e2..7fc401b 100644 --- a/ci/terraform.yml +++ b/ci/terraform.yml @@ -1,7 +1,7 @@ # This workflow installs the latest version of Terraform CLI and configures the Terraform CLI configuration file # with an API token for Terraform Cloud (app.terraform.io). On pull request events, this workflow will run # `terraform init`, `terraform fmt`, and `terraform plan` (speculative plan via Terraform Cloud). On push events -# to the master branch, `terraform apply` will be executed. +# to the $default-branch branch, `terraform apply` will be executed. # # Documentation for `hashicorp/setup-terraform` is located here: https://github.com/hashicorp/setup-terraform # @@ -47,7 +47,7 @@ name: 'Terraform' on: push: branches: - - master + - $default-branch pull_request: jobs: @@ -65,7 +65,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - # Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token + # Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token - name: Setup Terraform uses: hashicorp/setup-terraform@v1 with: @@ -82,9 +82,9 @@ jobs: # Generates an execution plan for Terraform - name: Terraform Plan run: terraform plan - - # On push to master, build or change infrastructure according to Terraform configuration files + + # On push to $default-branch, build or change infrastructure according to Terraform configuration files # Note: It is recommended to set up a required "strict" status check in your repository for "Terraform Cloud". See the documentation on "strict" required status checks for more information: https://help.github.com/en/github/administering-a-repository/types-of-required-status-checks - name: Terraform Apply - if: github.ref == 'refs/heads/master' && github.event_name == 'push' + if: github.ref == 'refs/heads/$default-branch' && github.event_name == 'push' run: terraform apply -auto-approve From 7ed78293f73a2b40e29a46a4b3be386c8c534b6b Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Mon, 13 Jul 2020 12:13:03 -0700 Subject: [PATCH 13/17] Use repository link --- automation/label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/label.yml b/automation/label.yml index e90b599..7c724a6 100644 --- a/automation/label.yml +++ b/automation/label.yml @@ -3,7 +3,7 @@ # # To use this workflow, you will need to set up a .github/labeler.yml # file with configuration. For more information, see: -# https://github.com/actions/labeler/blob/master/README.md +# https://github.com/actions/labeler name: Labeler on: [pull_request] From 930a2cac2bfea6c9d44813a374348d81b7b410fd Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Tue, 14 Jul 2020 12:57:43 -0700 Subject: [PATCH 14/17] Update PR template to refer to $default-branch --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 01bb7bc..530b19d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -22,7 +22,7 @@ In the workflow and properties files: - [ ] Use sentence case for the names of workflows and steps, for example "Run tests". - [ ] The name of CI workflows should only be the name of the language or platform: for example "Go" (not "Go CI" or "Go Build") - [ ] Include comments in the workflow for any parts that are not obvious or could use clarification. -- [ ] CI workflows should run on `push` to `branches: [ master ]` and `pull_request` to `branches: [ master ]`. +- [ ] CI workflows should run on `push` to `branches: [ $default-branch ]` and `pull_request` to `branches: [ $default-branch ]`. - [ ] Packaging workflows should run on `release` with `types: [ created ]`. Some general notes: From 2740936be443d46a9dc0907df6103ab070156d18 Mon Sep 17 00:00:00 2001 From: Rob McGuire Date: Fri, 17 Jul 2020 19:54:48 -0700 Subject: [PATCH 15/17] Move "checkout" comment adjacent to its step --- ci/terraform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terraform.yml b/ci/terraform.yml index 7fc401b..e6cf027 100644 --- a/ci/terraform.yml +++ b/ci/terraform.yml @@ -60,8 +60,8 @@ jobs: run: shell: bash - # Checkout the repository to the GitHub Actions runner steps: + # Checkout the repository to the GitHub Actions runner - name: Checkout uses: actions/checkout@v2 From fae2392dd2801d3741150afe43ac3df1bb5d57dc Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Fri, 21 Aug 2020 09:24:31 -0400 Subject: [PATCH 16/17] Update ci/r.yml Co-authored-by: Andy McKay --- ci/r.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/r.yml b/ci/r.yml index cad232b..efc6587 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -10,9 +10,9 @@ name: R on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: From dc7a645261e96af0083db1398c7e0b912d1c6688 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Fri, 21 Aug 2020 08:25:55 -0700 Subject: [PATCH 17/17] Update ci/properties/r.properties.json --- ci/properties/r.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json index a9c6c61..84ba0ec 100644 --- a/ci/properties/r.properties.json +++ b/ci/properties/r.properties.json @@ -1,6 +1,6 @@ { "name": "R package", "description": "Create and test an R package on multiple R versions.", - "iconName": "R", + "iconName": "r", "categories": ["R"] }