Verify Push Permissions #3
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: Verify Push Permissions | |
on: | |
workflow_dispatch: | |
jobs: | |
verify-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create a test file | |
run: echo "This is a test file to verify push permissions." > push_test.txt | |
- name: Configure Git | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Commit changes | |
run: | | |
git add push_test.txt | |
git commit -m "Add push_test.txt to verify push permissions" | |
- name: Print remote URL | |
run: git remote -v | |
- name: Push changes | |
run: | | |
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git push origin HEAD:main | |