-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sizeLabel GITHUB_OUTPUT for further reuse in other jobs (#44)
* Add sizeLabel GITHUB_OUTPUT for further reuse in other jobs * Add sizeLabel GITHUB_OUTPUT for further reuse in other jobs --------- Co-authored-by: Pascal <[email protected]>
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,35 @@ jobs: | |
} | ||
``` | ||
|
||
## Using with other actions | ||
|
||
If creating workflow with multiple jobs, they can react on the label set by this action: | ||
|
||
```yaml | ||
name: size-label | ||
on: pull_request_target | ||
jobs: | ||
label: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
outputs: | ||
label: ${{ steps.label.outputs.sizeLabel }} | ||
steps: | ||
- name: size-label | ||
id: label | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
comment: | ||
runs-on: ubuntu-latest | ||
needs: label | ||
if: ${{ contains(needs.label.outputs.label, 'XL') }} | ||
steps: | ||
- run: echo "Too big PR" | ||
``` | ||
|
||
## License | ||
|
||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters