Merge pull request #7 from senthil10/develop #41
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: Test actions | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
update_index_file: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
ref: develop | |
- name: Set local git config | |
run: | | |
git branch | |
git config --local user.name ${{ github.actor }} | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
- name: Update the file and push to develop | |
run: | | |
echo "This is a test file" > test_file.txt | |
git add test_file.txt | |
git commit -m "Action file update" | |
git push origin develop | |
- name: Make pull request to main branch | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh pr create --base main --head develop --title "Action PR" --body "Updating the file" |