Github Actions - rubyforgood/casa GitHub Wiki

Table of Contents generated with DocToc

How to test new github actions

  1. Create a new repo on github

  2. Create a repo locally

    • mkdir github-actions-test-repo
    • cd github-actions-test-repo
    • git init
  3. Add your bot script as a submodule and commit

    • git submodule add [email protected]:username/bot-repo-name.git
    • git add bot-repo-name
    • git add .gitmodules
    • git commit -m "initial commit"
  4. Create a .yml file like this in .github/workflows/ for each script to test

on:
  workflow_dispatch: # Enable manually running the action

jobs:
  add_help_wanted_labels:
    runs-on: ubuntu-latest
    name: Add help wanted labels # (Optional) The name of the workflow as it will appear in the Actions tab of the GitHub repository
    steps:
      - uses: actions/checkout@main # actions/checkout@{NAME OF THE BRANCH WITH CODE TO BE TESTED}
        with:
          submodules: 'true' # Enable actions/checkout to access submodules with depth 1
      - uses: ./add-label-to-cards/ # Path to custom script
        id: add-help-wanted-labels
        name: Add help wanted labels
        with: # Place arguments to be passed to the script here
          token: ${{secrets.GITHUB_TOKEN}}
          label_to_add: 'Help Wanted' # Argument
          column_id: '16739169' # Another argument