Skip to content

Commit

Permalink
add workflow 54 - Permission
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Falourd <[email protected]>
  • Loading branch information
GuillaumeFalourd committed Jun 22, 2022
1 parent 6dbc1ae commit c30eedd
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/54-permission.yml
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

0 comments on commit c30eedd

Please sign in to comment.