-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.yaml
More file actions
89 lines (70 loc) · 2.18 KB
/
Copy pathREADME.yaml
File metadata and controls
89 lines (70 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: pr-comment-on-release
# Tags of this project
tags:
- github-action
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse-github-actions/pr-comment-on-release
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/example-github-action-composite.svg"
url: "https://github.com/cloudposse/example-github-action-composite/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
related: []
# Short description of this project
description: Comments on a PR when it is included in a GitHub release.
introduction: |-
This action comments on a PR when it has commits associated with a release.
This action should typically be called in a worklow with the `on.release` trigger:
```yaml
name: PR Comment on Release
on:
release:
types: [published]
permissions:
deployments: write
id-token: write
contents: write
pull-requests: write
jobs:
context:
runs-on: ubuntu-latest
steps:
- name: Comment on Release
uses: cloudposse-github-actions/pr-comment-on-release
id: pr-comment-on-release
with:
# Optional: only comment on PRs when the release matches a certain regex (default: ".*")
include_regex: "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$"
```
This action returns a JSON-encoded string, which contains information on the comments it created (if any):
```jsonc
{
"comments": [
"pull_request": 1, // the PR #
"comment_id": 12345 // the comment ID
]
}
```
references:
- name: "cloudposse-github-actions"
description: "Reusable workflows for different types of projects"
url: "https://github.com/cloudposse-github-actions"
includes:
- "docs/github-action.md"
# Contributors to this project
contributors:
- name: "Yoni Koren"
github: "korenyoni"