GithubHelp home page GithubHelp logo

actionsflow-demo's Introduction

This is a workflow repository powered by Actionsflow, generated from actionsflow/actionsflow-workflow-default

๐Ÿ Getting Started

Build an Actionsflow workflow is a four-step process:

  1. Create a public Github repository by this link.

    A typical Actionsflow repository structure looks like this:

    โ”œโ”€โ”€ .github
    โ”‚   โ””โ”€โ”€ workflows
    โ”‚       โ””โ”€โ”€ actionsflow.yml
    โ”œโ”€โ”€ .gitignore
    โ”œโ”€โ”€ README.md
    โ””โ”€โ”€ workflows
    โ”‚   โ””โ”€โ”€ rss.yml
    โ”‚   โ””โ”€โ”€ webhook.yml
    โ””โ”€โ”€ package.json
  2. Uncomment .github/workflows/actionsflow.yml schedule event

    on:
      schedule:
        - cron: "*/15 * * * *"

    Note: To prevent abuse, by default, the schedule is commented, please modify the schedule time according to your own needs, the default is once every 15 minutes. Learn more about schedule event, please see here

  3. Define your workflow file at workflows directory

    A typical workflow file rss.yml looks like this:

    on:
      rss:
        url: https://hnrss.org/newest?points=300&count=3
    jobs:
      request:
        name: Make a HTTP Request
        runs-on: ubuntu-latest
        steps:
          - name: Make a HTTP Request
            uses: actionsflow/axios@v1
            with:
              url: https://hookb.in/VGPzxoWbdjtE22bwznzE
              method: POST
              body: |
                {
                  "link":"${{ on.rss.outputs.link }}", 
                  "title": "${{ on.rss.outputs.title }}",
                  "content":"<<<${{ on.rss.outputs.contentSnippet }}>>>"
                }

    For more information about the Actionsflow workflow file, see the Actionsflow workflow reference.

    You can explore Triggers List or Awesome Actionsflow Workflows to get more inspired.

  4. Commit and push your updates to Github

Then, Actionsflow will run your workflows as you defined, you can view logs at your repository actions tab at Github

For more information, see Full documentation

Run Locally

You can run self-hosted Actionsflow manually or by docker:

Prerequisites

  1. Install docker
  2. Install act
  3. Install dependencies by running npm install

Start

Start Actionsflow locally:

npm run start
# Then, the cron job and webhook server will start running
# The webhook endpoint will be ran at http://localhost:3000/webhook/

Build

npm run build
# Then, the standard workflow files will be built at ./dist/workflows

Clean

Actionsflow build will use cache for deduplicating the data, if you want to test your workflow with the same data, you may need to clean the cache by the following command:

# Clean the cache and dist folder.
npm run clean

Learn more abount self-hosted Actionsflow here

๐ŸŽ“ Learn More

Full documentation for Actionsflow lives on the website.

actionsflow-demo's People

Contributors

mingxin-yang avatar

Watchers

 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.