diff --git a/README.md b/README.md index 4b5b9f8..f39892f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ These are the workflow files for helping people get started with GitHub Actions. ### Directory structure -* [ci](ci): solutions for Continuous Integration and Deployments +* [ci](ci): solutions for Continuous Integration workflows. +* [deployments](deployments): solutions for Deployment workflows. * [automation](automation): solutions for automating workflows. * [code-scanning](code-scanning): starter workflows for [Code Scanning](https://github.com/features/security) * [icons](icons): svg icons for the relevant template @@ -44,5 +45,5 @@ For example: `ci/django.yml` and `ci/properties/django.properties.json`. These variables can be placed in the starter workflow and will be substituted as detailed below: * `$default-branch`: will substitute the branch from the repository, for example `main` and `master` -* `$protected-branches`: will substitue any protected branches from the repository. +* `$protected-branches`: will substitute any protected branches from the repository * `$cron-daily`: will substitute a valid but random time within the day diff --git a/ci/dotnet-desktop.yml b/ci/dotnet-desktop.yml index 2e55b15..0635779 100644 --- a/ci/dotnet-desktop.yml +++ b/ci/dotnet-desktop.yml @@ -107,7 +107,7 @@ jobs: - 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 + # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - name: Upload build artifacts uses: actions/upload-artifact@v2 with: diff --git a/ci/makefile.yml b/ci/makefile.yml new file mode 100644 index 0000000..eafe622 --- /dev/null +++ b/ci/makefile.yml @@ -0,0 +1,27 @@ +name: Makefile CI + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: configure + run: ./configure + + - name: Install dependencies + run: make + + - name: Run check + run: make check + + - name: Run distcheck + run: make distcheck diff --git a/ci/grunt.yml b/ci/npm-grunt.yml similarity index 100% rename from ci/grunt.yml rename to ci/npm-grunt.yml diff --git a/ci/gulp.yml b/ci/npm-gulp.yml similarity index 100% rename from ci/gulp.yml rename to ci/npm-gulp.yml diff --git a/ci/objective-c-xcode.yml b/ci/objective-c-xcode.yml new file mode 100644 index 0000000..db009b0 --- /dev/null +++ b/ci/objective-c-xcode.yml @@ -0,0 +1,30 @@ +name: Xcode - Build and Analyze + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + name: Build and analyse default scheme using xcodebuild command + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + - name: Build + env: + scheme: ${{ 'default' }} + run: | + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild clean build analyze -scheme "$scheme" -"$filetype_parameter" "$file_to_build" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/ci/properties/ada.properties.json b/ci/properties/ada.properties.json index 71021d0..c4c2b3a 100644 --- a/ci/properties/ada.properties.json +++ b/ci/properties/ada.properties.json @@ -2,5 +2,5 @@ "name": "Ada", "description": "Build Ada project with GPRbuild.", "iconName": "ada", - "categories": ["Ada"] + "categories": ["Continuous integration", "Ada"] } diff --git a/ci/properties/android.properties.json b/ci/properties/android.properties.json index 29d293f..a3ff2cd 100644 --- a/ci/properties/android.properties.json +++ b/ci/properties/android.properties.json @@ -2,5 +2,5 @@ "name": "Android CI", "description": "Build an Android project with Gradle.", "iconName": "android", - "categories": ["Java", "Mobile"] + "categories": ["Continuous integration", "Java", "Mobile"] } diff --git a/ci/properties/ant.properties.json b/ci/properties/ant.properties.json index 5a4d7a9..93d5473 100644 --- a/ci/properties/ant.properties.json +++ b/ci/properties/ant.properties.json @@ -2,5 +2,5 @@ "name": "Java with Ant", "description": "Build and test a Java project with Apache Ant.", "iconName": "ant", - "categories": ["Ant", "Java"] + "categories": ["Continuous integration", "Ant", "Java"] } diff --git a/ci/properties/c-cpp.properties.json b/ci/properties/c-cpp.properties.json index 5d2a2df..2d214a4 100644 --- a/ci/properties/c-cpp.properties.json +++ b/ci/properties/c-cpp.properties.json @@ -2,5 +2,5 @@ "name": "C/C++ with Make", "description": "Build and test a C/C++ project using Make.", "iconName": "c-cpp", - "categories": ["C", "C++"] + "categories": ["Continuous integration", "C", "C++"] } diff --git a/ci/properties/clojure.properties.json b/ci/properties/clojure.properties.json index 5a9e3ed..f57dfdf 100644 --- a/ci/properties/clojure.properties.json +++ b/ci/properties/clojure.properties.json @@ -2,5 +2,5 @@ "name": "Clojure", "description": "Build and test a Clojure project with Leiningen.", "iconName": "clojure", - "categories": ["Clojure", "Java"] + "categories": ["Continuous integration", "Clojure", "Java"] } diff --git a/ci/properties/cmake.properties.json b/ci/properties/cmake.properties.json index ac001c3..a7f5d06 100644 --- a/ci/properties/cmake.properties.json +++ b/ci/properties/cmake.properties.json @@ -2,5 +2,5 @@ "name": "CMake based projects", "description": "Build and test a CMake based project.", "iconName": "cmake", - "categories": ["C", "C++"] + "categories": ["Continuous integration", "C", "C++"] } \ No newline at end of file diff --git a/ci/properties/crystal.properties.json b/ci/properties/crystal.properties.json index bb058f7..244adbf 100644 --- a/ci/properties/crystal.properties.json +++ b/ci/properties/crystal.properties.json @@ -2,5 +2,5 @@ "name": "Crystal", "description": "Build and test a Crystal project.", "iconName": "crystal", - "categories": ["Crystal"] + "categories": ["Continuous integration", "Crystal"] } diff --git a/ci/properties/d.properties.json b/ci/properties/d.properties.json index 5c67054..8e51aa3 100644 --- a/ci/properties/d.properties.json +++ b/ci/properties/d.properties.json @@ -2,5 +2,5 @@ "name": "D", "description": "Build and test a D project with dub.", "iconName": "d", - "categories": [ "D" ] + "categories": ["Continuous integration", "D"] } diff --git a/ci/properties/dart.properties.json b/ci/properties/dart.properties.json index 022a003..f4bf112 100644 --- a/ci/properties/dart.properties.json +++ b/ci/properties/dart.properties.json @@ -2,5 +2,5 @@ "name": "Dart", "description": "Build and test a Dart project with Pub.", "iconName": "dart", - "categories": ["Dart"] + "categories": ["Continuous integration", "Dart"] } diff --git a/ci/properties/deno.properties.json b/ci/properties/deno.properties.json index 8a2c762..6d4d653 100644 --- a/ci/properties/deno.properties.json +++ b/ci/properties/deno.properties.json @@ -2,5 +2,5 @@ "name": "Deno", "description": "Test your Deno project", "iconName": "deno", - "categories": ["JavaScript", "TypeScript", "Deno"] + "categories": ["Continuous integration", "JavaScript", "TypeScript", "Deno"] } diff --git a/ci/properties/django.properties.json b/ci/properties/django.properties.json index 3015441..791fb21 100644 --- a/ci/properties/django.properties.json +++ b/ci/properties/django.properties.json @@ -2,5 +2,5 @@ "name": "Django", "description": "Build and Test a Django Project", "iconName": "django", - "categories": ["Python", "Django"] + "categories": ["Continuous integration", "Python", "Django"] } diff --git a/ci/properties/docker-image.properties.json b/ci/properties/docker-image.properties.json index 8ad7552..b13144c 100644 --- a/ci/properties/docker-image.properties.json +++ b/ci/properties/docker-image.properties.json @@ -2,5 +2,5 @@ "name": "Docker image", "description": "Build a Docker image to deploy, run, or push to a registry.", "iconName": "docker", - "categories": ["Dockerfile"] + "categories": ["Continuous integration", "Dockerfile"] } diff --git a/ci/properties/docker-publish.properties.json b/ci/properties/docker-publish.properties.json index 1b36c0f..890f4af 100644 --- a/ci/properties/docker-publish.properties.json +++ b/ci/properties/docker-publish.properties.json @@ -2,5 +2,5 @@ "name": "Publish Docker Container", "description": "Build, test and push Docker image to GitHub Packages.", "iconName": "docker", - "categories": ["Dockerfile"] + "categories": ["Continuous integration", "Dockerfile"] } diff --git a/ci/properties/dotnet-desktop.properties.json b/ci/properties/dotnet-desktop.properties.json index f6e1cb8..bbe9d10 100644 --- a/ci/properties/dotnet-desktop.properties.json +++ b/ci/properties/dotnet-desktop.properties.json @@ -2,5 +2,5 @@ "name": ".NET Desktop", "description": "Build, test, sign and publish a desktop application built on .NET.", "iconName": "dotnet", - "categories": ["C#", "Visual Basic", "WPF", ".NET"] + "categories": ["Continuous integration", "C#", "Visual Basic", "WPF", ".NET"] } \ No newline at end of file diff --git a/ci/properties/dotnet.properties.json b/ci/properties/dotnet.properties.json index b3feafb..1a46604 100644 --- a/ci/properties/dotnet.properties.json +++ b/ci/properties/dotnet.properties.json @@ -2,5 +2,5 @@ "name": ".NET", "description": "Build and test a .NET or ASP.NET Core project.", "iconName": "dotnet", - "categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"] + "categories": ["Continuous integration", "C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET", "AspNetCore", "DotNetConsole"] } diff --git a/ci/properties/elixir.properties.json b/ci/properties/elixir.properties.json index 572992d..6de4ea0 100644 --- a/ci/properties/elixir.properties.json +++ b/ci/properties/elixir.properties.json @@ -2,5 +2,5 @@ "name": "Elixir", "description": "Build and test an Elixir project with Mix.", "iconName": "elixir", - "categories": ["Elixir", "Erlang"] + "categories": ["Continuous integration", "Elixir", "Erlang"] } diff --git a/ci/properties/erlang.properties.json b/ci/properties/erlang.properties.json index d712b05..eba9af6 100644 --- a/ci/properties/erlang.properties.json +++ b/ci/properties/erlang.properties.json @@ -2,5 +2,5 @@ "name": "Erlang", "description": "Build and test an Erlang project with rebar.", "iconName": "erlang", - "categories": ["Erlang"] + "categories": ["Continuous integration", "Erlang"] } diff --git a/ci/properties/gem-push.properties.json b/ci/properties/gem-push.properties.json index 188d80a..0002ac5 100644 --- a/ci/properties/gem-push.properties.json +++ b/ci/properties/gem-push.properties.json @@ -2,5 +2,5 @@ "name": "Ruby Gem", "description": "Pushes a Ruby Gem to RubyGems and GitHub Package Registry.", "iconName": "ruby-gems", - "categories": ["Ruby"] + "categories": ["Continuous integration", "Ruby"] } diff --git a/ci/properties/go.properties.json b/ci/properties/go.properties.json index b96c0a1..1187f94 100644 --- a/ci/properties/go.properties.json +++ b/ci/properties/go.properties.json @@ -2,5 +2,5 @@ "name": "Go", "description": "Build a Go project.", "iconName": "go", - "categories": ["Go"] + "categories": ["Continuous integration", "Go"] } diff --git a/ci/properties/gradle-publish.properties.json b/ci/properties/gradle-publish.properties.json index 90b7295..0155310 100644 --- a/ci/properties/gradle-publish.properties.json +++ b/ci/properties/gradle-publish.properties.json @@ -2,5 +2,5 @@ "name": "Publish Java Package with Gradle", "description": "Build a Java Package using Gradle and publish to GitHub Packages.", "iconName": "gradle", - "categories": ["Java", "Gradle"] + "categories": ["Continuous integration", "Java", "Gradle", "Spring", "JSF"] } \ No newline at end of file diff --git a/ci/properties/gradle.properties.json b/ci/properties/gradle.properties.json index bfe1a6f..47d1ddb 100644 --- a/ci/properties/gradle.properties.json +++ b/ci/properties/gradle.properties.json @@ -2,5 +2,5 @@ "name": "Java with Gradle", "description": "Build and test a Java project using a Gradle wrapper script.", "iconName": "gradle", - "categories": ["Java", "Gradle"] + "categories": ["Continuous integration", "Java", "Gradle", "Spring", "JSF"] } diff --git a/ci/properties/haskell.properties.json b/ci/properties/haskell.properties.json index 2dedbf2..798d3d0 100644 --- a/ci/properties/haskell.properties.json +++ b/ci/properties/haskell.properties.json @@ -2,5 +2,5 @@ "name": "Haskell", "description": "Build and test a Haskell project with Cabal.", "iconName": "haskell", - "categories": ["Haskell"] + "categories": ["Continuous integration", "Haskell"] } diff --git a/ci/properties/ios.properties.json b/ci/properties/ios.properties.json index 0b3a9ed..f88edc9 100644 --- a/ci/properties/ios.properties.json +++ b/ci/properties/ios.properties.json @@ -3,6 +3,7 @@ "description": "Build and test an iOS application using xcodebuild and any available iPhone simulator.", "iconName": "xcode", "categories": [ + "Continuous integration", "iOS", "Xcode" ] diff --git a/ci/properties/jekyll.properties.json b/ci/properties/jekyll.properties.json index 38cc6cd..bbe279c 100644 --- a/ci/properties/jekyll.properties.json +++ b/ci/properties/jekyll.properties.json @@ -2,5 +2,5 @@ "name": "Jekyll", "description": "Package a Jekyll site using the jekyll/builder Docker image.", "iconName": "jekyll", - "categories": ["HTML"] + "categories": ["Continuous integration", "HTML"] } diff --git a/ci/properties/laravel.properties.json b/ci/properties/laravel.properties.json index f10a462..1c2e433 100644 --- a/ci/properties/laravel.properties.json +++ b/ci/properties/laravel.properties.json @@ -3,6 +3,7 @@ "description": "Test a Laravel project.", "iconName": "php", "categories": [ + "Continuous integration", "PHP", "Laravel" ] diff --git a/ci/properties/makefile.properties.json b/ci/properties/makefile.properties.json new file mode 100644 index 0000000..209bf70 --- /dev/null +++ b/ci/properties/makefile.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Build projects with Make", + "description": "Build and test a project using Make.", + "iconName": "makefile", + "categories": ["Continuous integration", "Makefile"] +} diff --git a/ci/properties/maven-publish.properties.json b/ci/properties/maven-publish.properties.json index 2f59f41..2bc750f 100644 --- a/ci/properties/maven-publish.properties.json +++ b/ci/properties/maven-publish.properties.json @@ -2,5 +2,5 @@ "name": "Publish Java Package with Maven", "description": "Build a Java Package using Maven and publish to GitHub Packages.", "iconName": "maven", - "categories": ["Java", "Maven"] + "categories": ["Continuous integration", "Java", "Maven", "Spring", "JSF"] } \ No newline at end of file diff --git a/ci/properties/maven.properties.json b/ci/properties/maven.properties.json index e322d04..be8f7bf 100644 --- a/ci/properties/maven.properties.json +++ b/ci/properties/maven.properties.json @@ -2,5 +2,5 @@ "name": "Java with Maven", "description": "Build and test a Java project with Apache Maven.", "iconName": "maven", - "categories": ["Java", "Maven"] + "categories": ["Continuous integration", "Java", "Maven", "Spring", "JSF"] } diff --git a/ci/properties/msbuild.properties.json b/ci/properties/msbuild.properties.json index b90cad8..c189be2 100644 --- a/ci/properties/msbuild.properties.json +++ b/ci/properties/msbuild.properties.json @@ -2,5 +2,5 @@ "name": "MSBuild based projects", "description": "Build a MSBuild based project.", "iconName": "c-cpp", - "categories": ["C", "C++"] + "categories": ["Continuous integration", "C", "C++"] } \ No newline at end of file diff --git a/ci/properties/node.js.properties.json b/ci/properties/node.js.properties.json index 557222a..7f68d88 100644 --- a/ci/properties/node.js.properties.json +++ b/ci/properties/node.js.properties.json @@ -2,5 +2,5 @@ "name": "Node.js", "description": "Build and test a Node.js project with npm.", "iconName": "nodejs", - "categories": ["JavaScript", "npm"] + "categories": ["Continuous integration", "JavaScript", "npm", "React", "Angular", "Vue"] } diff --git a/ci/properties/grunt.properties.json b/ci/properties/npm-grunt.properties.json similarity index 56% rename from ci/properties/grunt.properties.json rename to ci/properties/npm-grunt.properties.json index c8a5b9f..34a0a35 100644 --- a/ci/properties/grunt.properties.json +++ b/ci/properties/npm-grunt.properties.json @@ -2,5 +2,5 @@ "name": "Grunt", "description": "Build a NodeJS project with npm and grunt.", "iconName": "grunt", - "categories": ["JavaScript", "TypeScript", "npm", "Grunt"] + "categories": ["Continuous integration", "JavaScript", "TypeScript", "npm", "Grunt"] } diff --git a/ci/properties/gulp.properties.json b/ci/properties/npm-gulp.properties.json similarity index 56% rename from ci/properties/gulp.properties.json rename to ci/properties/npm-gulp.properties.json index 658325b..3b4201a 100644 --- a/ci/properties/gulp.properties.json +++ b/ci/properties/npm-gulp.properties.json @@ -2,5 +2,5 @@ "name": "Gulp", "description": "Build a NodeJS project with npm and gulp.", "iconName": "gulp", - "categories": ["JavaScript", "TypeScript", "npm", "Gulp"] + "categories": ["Continuous integration", "JavaScript", "TypeScript", "npm", "Gulp"] } diff --git a/ci/properties/npm-publish.properties.json b/ci/properties/npm-publish.properties.json index 764dbf3..9371d7b 100644 --- a/ci/properties/npm-publish.properties.json +++ b/ci/properties/npm-publish.properties.json @@ -2,5 +2,5 @@ "name": "Publish Node.js Package", "description": "Publishes a Node.js package to npm and GitHub Packages.", "iconName": "node-package-transparent", - "categories": ["JavaScript", "npm"] + "categories": ["Continuous integration", "JavaScript", "npm"] } diff --git a/ci/properties/objective-c-xcode.properties.json b/ci/properties/objective-c-xcode.properties.json new file mode 100644 index 0000000..e6068fe --- /dev/null +++ b/ci/properties/objective-c-xcode.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Xcode - Build and Analyze", + "description": "Build Xcode project using xcodebuild", + "iconName": "xcode", + "categories": ["Continuous integration", "Xcode", "Objective-C"] +} diff --git a/ci/properties/php.properties.json b/ci/properties/php.properties.json index 641e536..f345a28 100644 --- a/ci/properties/php.properties.json +++ b/ci/properties/php.properties.json @@ -2,5 +2,5 @@ "name": "PHP", "description": "Build and test a PHP application using Composer", "iconName": "php", - "categories": ["PHP", "Composer"] + "categories": ["Continuous integration", "PHP", "Composer"] } \ No newline at end of file diff --git a/ci/properties/pylint.properties.json b/ci/properties/pylint.properties.json index c7d1363..23c15dc 100644 --- a/ci/properties/pylint.properties.json +++ b/ci/properties/pylint.properties.json @@ -2,5 +2,5 @@ "name": "Pylint", "description": "Lint a Python application with pylint.", "iconName": "python", - "categories": ["Python"] + "categories": ["Continuous integration", "Python", "Bottle", "Flask"] } diff --git a/ci/properties/python-app.properties.json b/ci/properties/python-app.properties.json index 34e4a57..1229b29 100644 --- a/ci/properties/python-app.properties.json +++ b/ci/properties/python-app.properties.json @@ -2,5 +2,5 @@ "name": "Python application", "description": "Create and test a Python application.", "iconName": "python", - "categories": ["Python"] + "categories": ["Continuous integration", "Python", "Bottle", "Flask"] } diff --git a/ci/properties/python-package-conda.properties.json b/ci/properties/python-package-conda.properties.json index 1f6436d..5600766 100644 --- a/ci/properties/python-package-conda.properties.json +++ b/ci/properties/python-package-conda.properties.json @@ -2,5 +2,5 @@ "name": "Python Package using Anaconda", "description": "Create and test a Python package on multiple Python versions using Anaconda for package management.", "iconName": "python", - "categories": ["Python"] + "categories": ["Continuous integration", "Python"] } diff --git a/ci/properties/python-package.properties.json b/ci/properties/python-package.properties.json index 4e09d40..8c9dbcf 100644 --- a/ci/properties/python-package.properties.json +++ b/ci/properties/python-package.properties.json @@ -2,5 +2,5 @@ "name": "Python package", "description": "Create and test a Python package on multiple Python versions.", "iconName": "python", - "categories": ["Python"] + "categories": ["Continuous integration", "Python", "Bottle", "Flask"] } diff --git a/ci/properties/python-publish.properties.json b/ci/properties/python-publish.properties.json index 4fd9ece..9219e0f 100644 --- a/ci/properties/python-publish.properties.json +++ b/ci/properties/python-publish.properties.json @@ -2,5 +2,5 @@ "name": "Publish Python Package", "description": "Publish a Python Package to PyPI on release.", "iconName": "python", - "categories": ["Python"] + "categories": ["Continuous integration", "Python"] } diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json index 84ba0ec..9f83a25 100644 --- a/ci/properties/r.properties.json +++ b/ci/properties/r.properties.json @@ -2,5 +2,5 @@ "name": "R package", "description": "Create and test an R package on multiple R versions.", "iconName": "r", - "categories": ["R"] + "categories": ["Continuous integration", "R"] } diff --git a/ci/properties/rails-lint.properties.json b/ci/properties/rails-lint.properties.json deleted file mode 100644 index 7a109a1..0000000 --- a/ci/properties/rails-lint.properties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Rails - Build and Run Linters", - "description": "Build Rails application and run linters", - "iconName": "ruby", - "categories": ["Ruby", "Rails"] -} diff --git a/ci/properties/ruby.properties.json b/ci/properties/ruby.properties.json index 904f12f..894436b 100644 --- a/ci/properties/ruby.properties.json +++ b/ci/properties/ruby.properties.json @@ -2,5 +2,5 @@ "name": "Ruby", "description": "Build and test a Ruby project with Rake.", "iconName": "ruby", - "categories": ["Ruby"] + "categories": ["Continuous integration", "Ruby"] } diff --git a/ci/properties/rubyonrails-lint.properties.json b/ci/properties/rubyonrails-lint.properties.json new file mode 100644 index 0000000..e6e5f69 --- /dev/null +++ b/ci/properties/rubyonrails-lint.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Rails - Install Dependencies and Run Linters", + "description": "Install dependencies and run linters on Rails application", + "iconName": "ruby", + "categories": ["Continuous integration", "Ruby", "Rails"] +} diff --git a/ci/properties/rust.properties.json b/ci/properties/rust.properties.json index 3a6dc02..3e834d9 100644 --- a/ci/properties/rust.properties.json +++ b/ci/properties/rust.properties.json @@ -2,5 +2,5 @@ "name": "Rust", "description": "Build and test a Rust project with Cargo.", "iconName": "rust", - "categories": ["Rust"] + "categories": ["Continuous integration", "Rust"] } \ No newline at end of file diff --git a/ci/properties/scala.properties.json b/ci/properties/scala.properties.json index a92fc73..34dde26 100644 --- a/ci/properties/scala.properties.json +++ b/ci/properties/scala.properties.json @@ -2,5 +2,5 @@ "name": "Scala", "description": "Build and test a Scala project with SBT.", "iconName": "scala", - "categories": ["Scala", "Java"] + "categories": ["Continuous integration", "Scala", "Java"] } diff --git a/ci/properties/super-linter.properties.json b/ci/properties/super-linter.properties.json new file mode 100644 index 0000000..e070300 --- /dev/null +++ b/ci/properties/super-linter.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Super Linter - Run Linters for several languages", + "description": "Run linters for several languages on your code base for changed files", + "iconName": "octicon check-circle", + "categories": ["code-quality", "code-review"] +} diff --git a/ci/properties/swift.properties.json b/ci/properties/swift.properties.json index 9efd645..b26a264 100644 --- a/ci/properties/swift.properties.json +++ b/ci/properties/swift.properties.json @@ -2,5 +2,5 @@ "name": "Swift", "description": "Build and test a Swift Package.", "iconName": "swift", - "categories": ["Swift"] + "categories": ["Continuous integration", "Swift"] } diff --git a/ci/properties/webpack.properties.json b/ci/properties/webpack.properties.json index 1e22ccb..6d8b1a5 100644 --- a/ci/properties/webpack.properties.json +++ b/ci/properties/webpack.properties.json @@ -2,5 +2,5 @@ "name": "Webpack", "description": "Build a NodeJS project with npm and webpack.", "iconName": "webpack", - "categories": ["JavaScript", "TypeScript", "npm", "Webpack"] + "categories": ["Continuous integration", "JavaScript", "TypeScript", "npm", "Webpack"] } diff --git a/ci/rails-lint.yml b/ci/rubyonrails-lint.yml similarity index 87% rename from ci/rails-lint.yml rename to ci/rubyonrails-lint.yml index b2f8832..d95b70e 100644 --- a/ci/rails-lint.yml +++ b/ci/rubyonrails-lint.yml @@ -3,7 +3,7 @@ # separate terms of service, privacy policy, and support # documentation. # This workflow will download a prebuilt Ruby version, install dependencies, and run linters -name: Build Rails and run linters +name: Rails - Install dependencies and run linters on: push: @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Ruby and install gems - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e with: bundler-cache: true # Add or Replace any other security checks here diff --git a/ci/super-linter.yml b/ci/super-linter.yml new file mode 100644 index 0000000..bebd82d --- /dev/null +++ b/ci/super-linter.yml @@ -0,0 +1,29 @@ +# This workflow executes several linters on changed files based on languages used in your code base whenever +# you push a code or open a pull request. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/github/super-linter +name: Lint Code Base + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] +jobs: + run-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: $default-branch + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/deployments/openshift.yml b/deployments/openshift.yml index ec5e0fb..46ff961 100644 --- a/deployments/openshift.yml +++ b/deployments/openshift.yml @@ -3,61 +3,57 @@ # separate terms of service, privacy policy, and support # documentation. -### The OpenShift Starter workflow will: +# 💁 The OpenShift Starter workflow will: # - Checkout your repository -# - Perform a Docker build -# - Push the built image to an image registry +# - Perform a container image build +# - Push the built image to the GitHub Container Registry (GHCR) # - Log in to your OpenShift cluster -# - Create an OpenShift app from the image and expose it to the internet. +# - Create an OpenShift app from the image and expose it to the internet -### Before you begin: -# - Have write access to a container image registry such as quay.io or Dockerhub. -# - Have access to an OpenShift cluster. -# - For instructions to get started with OpenShift see https://www.openshift.com/try -# - The project you wish to add this workflow to should have a Dockerfile. -# - If you don't have a Dockerfile at the repository root, see the buildah-build step. -# - Builds from scratch are also available, but require more configuration. +# â„šī¸ Configure your repository and the workflow with the following steps: +# 1. Have access to an OpenShift cluster. Refer to https://www.openshift.com/try +# 2. Create the OPENSHIFT_SERVER and OPENSHIFT_TOKEN repository secrets. Refer to: +# - https://github.com/redhat-actions/oc-login#readme +# - https://docs.github.com/en/actions/reference/encrypted-secrets +# - https://cli.github.com/manual/gh_secret_set +# 3. (Optional) Edit the top-level 'env' section as marked with 'đŸ–Šī¸' if the defaults are not suitable for your project. +# 4. (Optional) Edit the build-image step to build your project. +# The default build type is by using a Dockerfile at the root of the repository, +# but can be replaced with a different file, a source-to-image build, or a step-by-step buildah build. +# 5. Commit and push the workflow file to your default branch to trigger a workflow run. -### To get the workflow running: -# 1. Add this workflow to your repository. -# 2. Edit the top-level 'env' section, which contains a list of environment variables that must be configured. -# 3. Create the secrets referenced in the 'env' section under your repository Settings. -# 4. Edit the 'branches' in the 'on' section to trigger the workflow on a push to your branch. -# 5. Commit and push your changes. - -# For a more sophisticated example, see https://github.com/redhat-actions/spring-petclinic/blob/main/.github/workflows/petclinic-sample.yaml -# Also see our GitHub organization, https://github.com/redhat-actions/ -# â–ļī¸ See a video of how to set up this workflow at https://www.youtube.com/watch?v=6hgBO-1pKho +# 👋 Visit our GitHub organization at https://github.com/redhat-actions/ to see our actions and provide feedback. name: OpenShift -# âŦ‡ī¸ Modify the fields marked with âŦ‡ī¸ to fit your project, and create any secrets that are referenced. -# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets env: - # âŦ‡ī¸ EDIT with your registry and registry path. - REGISTRY: quay.io/ - # âŦ‡ī¸ EDIT with your registry username. - REGISTRY_USER: - REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} - - # âŦ‡ī¸ EDIT to log into your OpenShift cluster and set up the context. + # đŸ–Šī¸ EDIT your repository secrets to log into your OpenShift cluster and set up the context. # See https://github.com/redhat-actions/oc-login#readme for how to retrieve these values. + # To get a permanent token, refer to https://github.com/redhat-actions/oc-login/wiki/Using-a-Service-Account-for-GitHub-Actions OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }} OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }} - - # âŦ‡ī¸ EDIT with any additional port your application should expose. - # By default, oc new-app action creates a service to the image's lowest numeric exposed port. - APP_PORT: "" - - # âŦ‡ī¸ EDIT if you wish to set the kube context's namespace after login. Leave blank to use the default namespace. + # đŸ–Šī¸ EDIT to set the kube context's namespace after login. Leave blank to use your user's default namespace. OPENSHIFT_NAMESPACE: "" - # If you wish to manually provide the APP_NAME and TAG, set them here, otherwise they will be auto-detected. + # đŸ–Šī¸ EDIT to set a name for your OpenShift app, or a default one will be generated below. APP_NAME: "" - TAG: "" + + # đŸ–Šī¸ EDIT with the port your application should be accessible on. + # If the container image exposes *exactly one* port, this can be left blank. + # Refer to the 'port' input of https://github.com/redhat-actions/oc-new-app + APP_PORT: "" + + # đŸ–Šī¸ EDIT to change the image registry settings. + # Registries such as GHCR, Quay.io, and Docker Hub are supported. + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + IMAGE_REGISTRY_USER: ${{ github.actor }} + IMAGE_REGISTRY_PASSWORD: ${{ github.token }} + + # đŸ–Šī¸ EDIT to specify custom tags for the container image, or default tags will be generated below. + IMAGE_TAGS: "" on: - # https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows + # https://docs.github.com/en/actions/reference/events-that-trigger-workflows push: # Edit to the branch(es) you want to build and deploy on each push. branches: [ $default-branch ] @@ -65,32 +61,40 @@ on: jobs: openshift-ci-cd: name: Build and deploy to OpenShift + # ubuntu-20.04 can also be used. runs-on: ubuntu-18.04 environment: production outputs: - ROUTE: ${{ steps.deploy-and-expose.outputs.route }} - SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }} + ROUTE: ${{ steps.deploy-and-expose.outputs.route }} + SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }} steps: - - name: Check if secrets exists - uses: actions/github-script@v3 + - name: Check for required secrets + uses: actions/github-script@v4 with: script: | const secrets = { - REGISTRY_PASSWORD: `${{ secrets.REGISTRY_PASSWORD }}`, OPENSHIFT_SERVER: `${{ secrets.OPENSHIFT_SERVER }}`, OPENSHIFT_TOKEN: `${{ secrets.OPENSHIFT_TOKEN }}`, }; + const GHCR = "ghcr.io"; + if (`${{ env.IMAGE_REGISTRY }}`.startsWith(GHCR)) { + core.info(`Image registry is ${GHCR} - no registry password required`); + } + else { + core.info("A registry password is required"); + secrets["IMAGE_REGISTRY_PASSWORD"] = `${{ secrets.IMAGE_REGISTRY_PASSWORD }}`; + } + const missingSecrets = Object.entries(secrets).filter(([ name, value ]) => { if (value.length === 0) { - core.warning(`Secret "${name}" is not set`); + core.error(`Secret "${name}" is not set`); return true; } core.info(`âœ”ī¸ Secret "${name}" is set`); return false; - }); if (missingSecrets.length > 0) { @@ -104,48 +108,50 @@ jobs: core.info(`✅ All the required secrets are set`); } - - uses: actions/checkout@v2 + - name: Check out repository + uses: actions/checkout@v2 - name: Determine app name if: env.APP_NAME == '' run: | echo "APP_NAME=$(basename $PWD)" | tee -a $GITHUB_ENV - - name: Determine tag - if: env.TAG == '' + - name: Determine image tags + if: env.IMAGE_TAGS == '' run: | - echo "TAG=${GITHUB_SHA::7}" | tee -a $GITHUB_ENV + echo "IMAGE_TAGS=latest ${GITHUB_SHA::12}" | tee -a $GITHUB_ENV # https://github.com/redhat-actions/buildah-build#readme - name: Build from Dockerfile - id: image-build + id: build-image uses: redhat-actions/buildah-build@v2 with: image: ${{ env.APP_NAME }} - tags: ${{ env.TAG }} - # If you don't have a dockerfile, see: - # https://github.com/redhat-actions/buildah-build#scratch-build-inputs - # Otherwise, point this to your Dockerfile relative to the repository root. + tags: ${{ env.IMAGE_TAGS }} + + # If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs + # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build + # Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. dockerfiles: | ./Dockerfile # https://github.com/redhat-actions/push-to-registry#readme - name: Push to registry - id: push-to-registry + id: push-image uses: redhat-actions/push-to-registry@v2 with: - image: ${{ steps.image-build.outputs.image }} - tags: ${{ steps.image-build.outputs.tags }} - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USER }} - password: ${{ env.REGISTRY_PASSWORD }} + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ env.IMAGE_REGISTRY_USER }} + password: ${{ env.IMAGE_REGISTRY_PASSWORD }} - # The path the image was pushed to is now stored in ${{ steps.push-to-registry.outputs.registry-path }} + # The path the image was pushed to is now stored in ${{ steps.push-image.outputs.registry-path }} - # oc-login works on all platforms, but oc must be installed first. - # The GitHub Ubuntu runner already includes oc. - # Otherwise, https://github.com/redhat-actions/openshift-tools-installer can be used to install oc, - # as well as many other tools. + - name: Install oc + uses: redhat-actions/openshift-tools-installer@v1 + with: + oc: 4 # https://github.com/redhat-actions/oc-login#readme - name: Log in to OpenShift @@ -163,18 +169,19 @@ jobs: uses: redhat-actions/oc-new-app@v1 with: app_name: ${{ env.APP_NAME }} - image: ${{ steps.push-to-registry.outputs.registry-path }} + image: ${{ steps.push-image.outputs.registry-path }} namespace: ${{ env.OPENSHIFT_NAMESPACE }} port: ${{ env.APP_PORT }} - - name: View application route + - name: Print application URL + env: + ROUTE: ${{ steps.deploy-and-expose.outputs.route }} + SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }} run: | [[ -n ${{ env.ROUTE }} ]] || (echo "Determining application route failed in previous step"; exit 1) + echo echo "======================== Your application is available at: ========================" echo ${{ env.ROUTE }} echo "===================================================================================" echo echo "Your app can be taken down with: \"oc delete all --selector='${{ env.SELECTOR }}'\"" - env: - ROUTE: ${{ steps.deploy-and-expose.outputs.route }} - SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }} diff --git a/deployments/properties/openshift.properties.json b/deployments/properties/openshift.properties.json index 54948c2..d08351f 100644 --- a/deployments/properties/openshift.properties.json +++ b/deployments/properties/openshift.properties.json @@ -3,5 +3,5 @@ "description": "Build a Docker-based project and deploy it to OpenShift.", "creator": "Red Hat", "iconName": "openshift", - "categories": ["Dockerfile","Deployment" ] + "categories": ["Deployment", "Dockerfile"] } diff --git a/icons/makefile.svg b/icons/makefile.svg new file mode 100644 index 0000000..694ad2e --- /dev/null +++ b/icons/makefile.svg @@ -0,0 +1 @@ + \ No newline at end of file