From b51c1b1d4ddabeaa6c0cd283e5f28ec297e01368 Mon Sep 17 00:00:00 2001
From: Joffrey Bion <joffrey.bion@gmail.com>
Date: Sat, 4 Jan 2025 01:35:04 +0100
Subject: [PATCH] Add test workflow for push

---
 .github/workflows/test-token.yml | 46 ++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 .github/workflows/test-token.yml

diff --git a/.github/workflows/test-token.yml b/.github/workflows/test-token.yml
new file mode 100644
index 00000000..af1e864a
--- /dev/null
+++ b/.github/workflows/test-token.yml
@@ -0,0 +1,46 @@
+name: test-token
+
+on:
+  workflow_dispatch:
+    inputs:
+      changelog-commit-username:
+        description: 'The git user.name for the change log commit author'
+        default: 'github-actions[bot]'
+        required: true
+      changelog-commit-email:
+        description: 'The git user.email for the change log commit author'
+        default: '41898282+github-actions[bot]@users.noreply.github.com'
+        required: true
+jobs:
+  test-push-regular-token:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+      - name: Commit and push
+        shell: bash
+        run: |
+          git config --global user.name "${{ inputs.changelog-commit-username }}"
+          git config --global user.email "${{ inputs.changelog-commit-email }}"
+
+          echo test > test.txt
+          git add test.txt
+          git commit -m "Test commit"
+          git push
+  test-push-pat:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+      - name: Commit and push
+        shell: bash
+        run: |
+          git config --global user.name "${{ inputs.changelog-commit-username }}"
+          git config --global user.email "${{ inputs.changelog-commit-email }}"
+
+          echo test > test.txt
+          git add test.txt
+          git commit -m "Test commit"
+          
+          git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git
+          git push origin
\ No newline at end of file