All Projects → purescript-contrib → purescript-github-actions-toolkit

purescript-contrib / purescript-github-actions-toolkit

Licence: MIT License
PureScript wrapper around GitHub's Actions Toolkit

Programming Languages

purescript
368 projects
javascript
184084 projects - #8 most used programming language
Dhall
116 projects

Projects that are alternatives of or similar to purescript-github-actions-toolkit

action-python-poetry
Template repo to quickly make a tested and documented GitHub action in Python with Poetry
Stars: ✭ 85 (+304.76%)
Mutual labels:  github-actions
actions-pixela
GitHub Actions for Pixela (a-know/pi) - a-know/pi Setup Action. Linux (Ubuntu), macOS, and Windows are supported.
Stars: ✭ 12 (-42.86%)
Mutual labels:  github-actions
github-actions-automate-projects
GitHub Actions adding GitHub Issues & Pull requests to the specified GitHub Project column automatically ♻️
Stars: ✭ 44 (+109.52%)
Mutual labels:  github-actions
actions-sms
Send an SMS through GitHub Actions
Stars: ✭ 108 (+414.29%)
Mutual labels:  github-actions
setup-clang
GitHub action to set up Clang & LLVM
Stars: ✭ 28 (+33.33%)
Mutual labels:  github-actions
gha
🔧 Test your GitHub Actions workflow locally.
Stars: ✭ 53 (+152.38%)
Mutual labels:  github-actions
auto-request-review
A GitHub Action that automatically requests review of a pull request based on files changes and/or groups the author belongs to 🤖
Stars: ✭ 52 (+147.62%)
Mutual labels:  github-actions
arduino-lint-action
GitHub Actions action to check Arduino projects for problems
Stars: ✭ 20 (-4.76%)
Mutual labels:  github-actions
content-reminder
⏰ A GitHub Action that reminds you to share your own content
Stars: ✭ 28 (+33.33%)
Mutual labels:  github-actions
update-container-description-action
github action to update a Docker Hub, Quay or Harbor repository description from a README file
Stars: ✭ 20 (-4.76%)
Mutual labels:  github-actions
googletest-ci
Continuous integration (CI) + Google Test (gtest) + CMake example boilerplate demo
Stars: ✭ 14 (-33.33%)
Mutual labels:  github-actions
nodejs-postgresql-azure
Repositório responsável pela série de artigos sobre Node.js com PostgreSQL
Stars: ✭ 70 (+233.33%)
Mutual labels:  github-actions
github-create-release-action
Github Action that create Github Release automatically
Stars: ✭ 28 (+33.33%)
Mutual labels:  github-actions
pollmommy
⭐️ Hack your 🙈 vote out of 📈 Polldaddy surveys - used by 💰 BBC, Microsoft, Forbes, Pfizer, IBM
Stars: ✭ 31 (+47.62%)
Mutual labels:  github-actions
laravel-phpinsights-action
Run PHP Insights in Laravel in Github Actions
Stars: ✭ 17 (-19.05%)
Mutual labels:  github-actions
changelog-reader-action
A GitHub action to read and get data from the CHANGELOG.md file 🚀
Stars: ✭ 68 (+223.81%)
Mutual labels:  github-actions
pytest-coverage-comment
Comments a pull request with the pytest code coverage badge and full report
Stars: ✭ 32 (+52.38%)
Mutual labels:  github-actions
profile-readme-stats
Showcase your github stats on your profile README.md
Stars: ✭ 144 (+585.71%)
Mutual labels:  github-actions
install-swift
GitHub Action to install a version of Swift 🏎
Stars: ✭ 23 (+9.52%)
Mutual labels:  github-actions
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-38.1%)
Mutual labels:  github-actions

GitHub Actions Toolkit

CI Release Pursuit Maintainer: colinwahl

This library provides PureScript bindings to Github's Actions Toolkit, allowing you to automate your workflows with Actions written in PureScript.

Installation

Install GitHub Actions Toolkit with Spago:

spago install github-actions-toolkit

You will also need to install the npm packages for any bindings that you are using. For example, if you use functions exported from GitHub.Actions.Core, then you need to install the @actions/core npm package:

npm install @actions/core

Quick start

An Action is an action.yml file pair with a Node script.

This library provides PureScript bindings to Github's Actions Toolkit, which provides useful tools for writing Actions.

To write your own Action, create an action.yml file which specifies the inputs, outputs, and metadata which will be used by your Action. See GitHub's docs on the syntax of this file. Then you can use this library to write a Node script which will execute the Action based on the action.yml file.

You can use the Hello World PureScript Action template to get started defining your own Action. The template provides a starting point in order to define your own actions with these bindings!

Here are some common functions which are used when defining Actions:

Get an input with key username specified by the action.yml file for use in the script, then log it:

main :: Effect Unit
main = void $ runExceptT do
  username <- Core.getInput { name: "username", options: Just { required: true }}
  liftEffect $ Core.info username

Use which to check that a tool is installed, and set the job to failed if it isn't.

main :: Effect Unit
main = do
  result <- runExceptT (IO.which { tool: "spago", check: true })
  case result of
    Left err ->
      Core.error "spago not found"
      Core.setFailed "Required tool spago is not available for this job."
    Right spagoPath ->
      Core.info $ "spago found at path " <> spagoPath
      pure unit -- If your job ends without failing, then it succeeded.

Run an arbitrary command with exec.

main :: Effect Unit
main = do
  result <- runExceptT (Exec.exec' "spago build")
  case result of
    Left err ->
      -- Something bad happened, log error and set failed
      Core.error $ message err
      Core.setFailed "Exception was thrown during spago build"
    Right returnCode | returnCode == 0.0 ->
      Core.info "spago build succeeded"
    Right returnCode ->
      Core.warning $ "spago build failed with ruturn code" <> returnCode
      Core.setFailed "spago exited with nonzero return code"

You can find documentation for all of the functions in this library in the docs directory.

Documentation

GitHub Actions Toolkit documentation is stored in a few places:

  1. Module documentation is published on Pursuit.
  2. Written documentation is in the docs directory.

For a usage example, see the Hello World PureScript Action template. For a real-world action that uses these bindings, see Setup PureScript.

If you get stuck, there are several ways to get help:

Contributing

You can contribute to GitHub Actions Toolkit in several ways:

  1. If you encounter a problem or have a question, please open an issue. We'll do our best to work with you to resolve or answer it.

  2. If you would like to contribute code, tests, or documentation, please read the contributor guide. It's a short, helpful introduction to contributing to this library, including development instructions.

  3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the PureScript Discourse! Writing libraries and learning resources are a great way to help this library succeed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].