amen nudå #16
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
name: Create PR on Issue Creation | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
create-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Configure git | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
- name: Create a new branch | |
run: git checkout -b add-helloworld-file | |
- name: Create helloworld.txt | |
run: echo 'Hello, World!' > helloworld.txt | |
- name: Commit changes | |
run: | | |
git add helloworld.txt | |
git commit -m 'Add helloworld.txt' | |
- name: Push changes | |
run: git push origin add-helloworld-file | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Add helloworld.txt" | |
base: main | |
branch: add-helloworld-file | |
title: "Add helloworld.txt" | |
body: "This PR adds a helloworld.txt file." |