name: "Permissions"

on:
  workflow_dispatch:

jobs:
  example-job:
    permissions:
      contents: write
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Attempt Write Operation
        run: |
          touch permissions-test.txt
          git config --global user.name 'hangpersonal'
          git config --global user.email 'hangcui1201@gmail.com'
          git add permissions-test.txt
          git commit -m "Attempt to write"
          git push origin ${{ github.ref }}