-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Guillaume Falourd <[email protected]>
- Loading branch information
1 parent
6dbc1ae
commit c30eedd
Showing
1 changed file
with
44 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 54 - Permission | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
try: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create a Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
# The name of the tag. This should come from the webhook payload, `github.GITHUB_REF` when a user pushes a new tag | ||
tag_name: myTag | ||
# The name of the release. For example, `Release v1.0.1` | ||
release_name: ReleaseName | ||
draft: false | ||
prerelease: false | ||
api: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Create issue using REST API | ||
run: | | ||
curl --request POST \ | ||
--url https://api.github.com/repos/${{ github.repository }}/issues \ | ||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"title": "Automated issue for commit: ${{ github.sha }}", | ||
"body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_." | ||
}' \ | ||
--fail |