Skip to content

Instantly share code, notes, and snippets.

@mat-0
Created June 4, 2022 19:40
Show Gist options
  • Select an option

  • Save mat-0/e6d5982d24d35530bebfef157d76aff1 to your computer and use it in GitHub Desktop.

Select an option

Save mat-0/e6d5982d24d35530bebfef157d76aff1 to your computer and use it in GitHub Desktop.
Runs an action based on a label assigned to an issue, not as DRY as I would like
name: Add Item
on:
issues:
types: [labeled, edited]
jobs:
Validation:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, "labelname" )
outputs:
labelname: ${{ steps.validation.outputs.labelname }}
steps:
- name: Set Data
id: validation
run: echo "::set-output name=labelname::labelname"
Execution:
needs: Validation
name: Runner
uses: ./.github/workflows/runner.yml
with:
content: ${{ github.event.issue.body }}
label: ${{ needs.Validation.outputs.labelname }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment