Giter Site home page Giter Site logo

test-ghactions's Introduction

Test Github Actions

Repository to test github actions.

Regular Self-Hosted Github Actions Setup

Installation / Setup

  • Add self-hosted runner to an organization

    • profile icon > your organizations > settings > actions > runners >

      new runner select OS and architecture (Linux, x64) follow instructions and commands in self-hosted machine

  • Configure the self-hosted runner application as a service:

    • source
    • Automatically starts the runner application when the machine starts
    • Steps:
      • Stop the runner applications if it is running
      • Install service: sudo ./svc.sh install
      • Start the service: sudo ./svc.sh start
      • Check the service: sudo ./svc.sh status
      • Stop the service: sudo ./svc.sh stop
      • Uninstall the service: sudo ./svc.sh uninstall
  • Require approval to run workflows from other repositories: source

    • profile icon > your organizations > settings > actions > general >

      Fork pull requests workflows from outside collaborators > Require approval for all outside collaborators

Remove Self-Hosted Runner

  • Instructions sources
    • go to organization page > settings > actions > runners >

      choose runner that you want to remove Remove Follow recommended instructions to remove self-hosted runner

Benefits

  • Extra installation (but simple)
  • Better integration with github tools
  • Simpler workflows (don't need to manage secrets and ssh connections from github's runners, etc

Security Concerns

From Github actions documentation: Warning: We recommend that you only use self-hosted runners with private repositories. This is because forks of your repository can potentially run dangerous code on your self-hosted runner machine by creating a pull request that executes the code in a workflow.

This is potentially problematic if we allow pull requests to run, since anyone can create a PR, anyone can trigger an arbitrary workflow in our systems.

Proposed Solution

  • Standard option is to require approval to run workflows from other repositories check this page for more information.

Other random options

  • Option 2: Don't trigger workflows in pull requests automatically.
  • Option 3: Allow organization members to trigger workflows.
    • This way, the organization members can trigger workflows for their PR's, while other people's PR's need manual review before triggering workflows.
    • Other Problem: manual triggered workflows do not update commit status
  • Option 4: Check for changes in .github/workflows
    • this is not as robust, since they can change any other script already run by the current workflow. For example changing what make test does

test-ghactions's People

Contributors

p-miranda avatar

Watchers

 avatar

Forkers

p-miranda-test

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.