We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72db343 commit 140c3d8Copy full SHA for 140c3d8
1 file changed
.github/workflows/build.yaml
@@ -6,6 +6,9 @@ on:
6
pull_request:
7
branches: [ main ]
8
9
+permissions:
10
+ contents: write
11
+
12
jobs:
13
build:
14
runs-on: ubuntu-latest
@@ -41,7 +44,11 @@ jobs:
41
44
git config --local user.email "action@github.com"
42
45
git config --local user.name "GitHub Action"
43
46
git add resume.pdf
- git diff --staged --quiet || git commit -m "Auto-update resume PDF"
- git push
47
+ if git diff --staged --quiet; then
48
+ echo "No changes to commit"
49
+ else
50
+ git commit -m "Auto-update resume PDF"
51
+ git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:main
52
+ fi
53
env:
54
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments