Skip to content

Commit

Permalink
create a Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sbermudez-rsi committed Sep 17, 2021
1 parent 8fc4f23 commit 16ca59c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Actions Workflow

on:
push:
pull_request:
branches:
- master
- 'feature/*' # matches feature/featA, feature/featB, doesn't match future/featC/a
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/env.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
name: ENV Variables
on: push
env:
WF_ENV: ${{ secrets.WF_ENV }}
WF_ENV: Available to all jobs

jobs:
create-issue:
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
log-env:
runs-on: ubuntu-latest
env:
Expand Down

0 comments on commit 16ca59c

Please sign in to comment.