Skip to content

Commit

Permalink
Update and rename gh-pr-create.yml to create-pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbhmr authored Apr 17, 2024
1 parent 4a3bf05 commit 74f4944
Showing 1 changed file with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: gh pr create
name: create-pull-request
on:
push:
branches: "main"
Expand All @@ -7,13 +7,13 @@ on:
- LICENSE
- .gitignore
- .github/**
- "!.github/workflows/gh-pr-create.yml"
- "!.github/workflows/create-pull-request.yml"
schedule:
- cron: "41 */6 * * *"
workflow_dispatch:
concurrency: ${{ github.workflow }}
jobs:
gh-pr-create:
create-pull-request:
permissions:
contents: write
pull-requests: write
Expand All @@ -34,14 +34,4 @@ jobs:
- run: npm run generate
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
version=$(jq -r '.version' package.json)
branch="generate-$version"
if ! git rev-parse --verify "$branch"; then
git checkout -b "$branch"
git add -A && git commit -m "Generate v$version"
git push -u origin "$branch"
gh pr create --fill
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v6

0 comments on commit 74f4944

Please sign in to comment.