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..7077f90 100644 --- a/ci/ant.yml +++ b/ci/ant.yml @@ -1,6 +1,13 @@ +# 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] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/aws.yml b/ci/aws.yml index 374ff09..40094ae 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, when 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..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 on every push to the master branch. +# This workflow will build and push a node.js application to an Azure Web App when 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/blank.yml b/ci/blank.yml index 317bc22..81e3002 100644 --- a/ci/blank.yml +++ b/ci/blank.yml @@ -1,16 +1,32 @@ +# This is a basic workflow to help you get started with Actions + name: CI -on: [push] +# 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/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/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/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/google.yml b/ci/google.yml index beb5e7f..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. +# 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: # @@ -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/gradle-publish.yml b/ci/gradle-publish.yml new file mode 100644 index 0000000..38b3656 --- /dev/null +++ b/ci/gradle-publish.yml @@ -0,0 +1,33 @@ +# 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 + +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 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: + USERNAME: ${{ github.actor }} + PASSWORD: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/ci/gradle.yml b/ci/gradle.yml index 4443382..50bea75 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -1,6 +1,13 @@ -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 -on: [push] +name: Java CI with Gradle + +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..7fc4665 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -1,10 +1,16 @@ name: Laravel -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: laravel-tests: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Copy .env diff --git a/ci/maven-publish.yml b/ci/maven-publish.yml new file mode 100644 index 0000000..fb1c7ee --- /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 when 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/maven.yml b/ci/maven.yml index ee2c5eb..c3e16c6 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -1,6 +1,13 @@ -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 -on: [push] +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/node.js.yml b/ci/node.js.yml index d22f03e..e7081a4 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -1,6 +1,13 @@ +# 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] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: 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: 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/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-publish.properties.json b/ci/properties/gradle-publish.properties.json new file mode 100644 index 0000000..90b7295 --- /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 to GitHub Packages.", + "iconName": "gradle", + "categories": ["Java", "Gradle"] +} \ No newline at end of file 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-publish.properties.json b/ci/properties/maven-publish.properties.json new file mode 100644 index 0000000..2f59f41 --- /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 to GitHub Packages.", + "iconName": "maven", + "categories": ["Java", "Maven"] +} \ No newline at end of file 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"] diff --git a/ci/python-app.yml b/ci/python-app.yml index 4c81e5e..1519cec 100644 --- a/ci/python-app.yml +++ b/ci/python-app.yml @@ -1,6 +1,13 @@ +# 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] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/python-package.yml b/ci/python-package.yml index 3aff529..846b2f9 100644 --- a/ci/python-package.yml +++ b/ci/python-package.yml @@ -1,6 +1,13 @@ +# 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] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: diff --git a/ci/python-publish.yml b/ci/python-publish.yml index b143a53..d5f3859 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: @@ -6,7 +9,9 @@ on: jobs: deploy: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Set up Python 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: