Code Monkey home page Code Monkey logo

github-actions's Introduction

drone-github-action-plugin

This plugin allows running github actions as a drone plugin.

Build

Build the binaries with the following commands:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/plugin   ./cmd

Docker

Build the Docker images with the following commands:

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/Dockerfile.linux.amd64 --tag plugins/github-actions .

Plugin step usage

Provide uses, with & env of github action to use in plugin step settings. Provide GITHUB_TOKEN as environment variable if it is required for an action.

steps:
- name: github-action
  image: plugins/github-actions
  settings:
    uses: actions/[email protected]
    with:
        who-to-greet: Mona the Octocat
    env:
        hello: world

Running locally

  1. If you are running it on mac locally & /var/run/docker.sock file does not exist, first run this command ln -s ~/.docker/run/docker.sock /var/run/docker.sock
  2. Running actions/hello-world-javascript-action action locally via docker:
 docker run --rm \
    --privileged \
    -v $(pwd):/drone \
    -w /drone \
    -e PLUGIN_USES="actions/[email protected]" \
    -e PLUGIN_WITH="{\"who-to-greet\":\"Mona the Octocat\"}" \
    -e PLUGIN_VERBOSE=true \
    plugins/github-actions

github-actions's People

Contributors

shubham149 avatar jimsheldon avatar rssnyder 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.