File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,17 @@ name: Test Tag Creation
22on :
33 workflow_dispatch :
44
5+ permissions :
6+ contents : write
7+
58jobs :
69 test-tagging :
710 runs-on : ubuntu-latest
811 steps :
912 - name : Checkout repository
1013 uses : actions/checkout@v4
11- with :
12- token : ${{ secrets.PAT_TOKEN }}
1314
1415 - name : Test Tag Creation and Push
15- env :
16- GITHUB_TOKEN : ${{ secrets.PAT_TOKEN }}
1716 run : |
1817 # Create a temporary test tag
1918 TAG="test-tag-v$(date +%s)"
2221 git config user.name "github-actions[bot]"
2322 git config user.email "github-actions[bot]@users.noreply.github.com"
2423
25- # Explicitly update remote with token to ensure correct authentication
26- git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
27-
2824 git tag "$TAG"
2925
3026 echo "Pushing tag..."
3329 echo "Tag pushed successfully. Cleaning up..."
3430 git push --delete origin "$TAG"
3531 echo "Cleanup complete."
36-
You can’t perform that action at this time.
0 commit comments