-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd121cc
commit 3028b38
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |