GithubHelp home page GithubHelp logo

actions's Introduction

GitHub Actions

Fun with robots.

This is a collection of GitHub Actions that I thought might be useful to others. There aren't many for now, but any general actions I create will get stored here.

This action allows you to make a service call to your Home Assistant instance. Blink a light when a deploy is done, set your lights to green when CI goes green, lock your front door until the deploy is complete.

Of course you want to incorporate your smart devices into your GitHub workflow!

image

action "Flash office lights" {
  uses = "maddox/actions/home-assistant@master"
  secrets = ["HASS_HOST", "HASS_TOKEN"]
  env = {
    SERVICE_DATA = "{\n  \"entity_id\": \"light.office\",\n  \"flash\": \"short\"\n}"
    DOMAIN = "light"
    SERVICE = "turn_on"
  }
}

This action will run the provided argument as a command on your $HOST via SSH.

image

action "Run deploy script" {
  uses = "maddox/actions/ssh@master"
  args = "/opt/deploy/run"
  secrets = [
    "PRIVATE_KEY",
    "PUBLIC_KEY",
    "HOST",
    "USER"
  ]
}

This action will simply call sleep for N seconds in case you need a little padding in your workflow.

image

action "Sleep" {
  uses = "maddox/actions/sleep@master"
  args = "15"
}

This action will simply check that a URL is returning a 200 HTTP status code before completing. You have the option to set how many seconds between checks and how many tries before it exits in failure.

image

action "Wait for 200" {
  uses = "maddox/actions/wait-for-200@master"
  env = {
    URL = "https://mysite.com"
    SECONDS_BETWEEN_CHECKS = "2"
    MAX_TRIES = "20"
  }
}

License

MIT. Please see additional information in each subdirectory.

actions's People

Contributors

anishkny avatar maddox avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.