This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 4b0239c4c6 Fix git push auth failure after actions/checkout v6 upgrade 
(#1453)
4b0239c4c6 is described below

commit 4b0239c4c65d13bea507f27c2e5e06ad03acde51
Author: Kaxil Naik <[email protected]>
AuthorDate: Wed Mar 11 21:20:15 2026 +0000

    Fix git push auth failure after actions/checkout v6 upgrade (#1453)
    
    actions/checkout v6 changed persist-credentials to store tokens in a
    separate file under $RUNNER_TEMP, referenced via git includeIf gitdir
    conditions. Because this workflow symlinks the repo to /mnt/airflow-site,
    the physical path no longer matches the includeIf condition and git
    cannot find credentials when pushing to the publish branch.
    
    Set the remote URL with the token explicitly before pushing.
---
 .github/workflows/build.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 37da5c20dd..18085206ce 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -176,11 +176,16 @@ jobs:
       - name: 🚀 Add commit to ${{ env.PUBLISH_BRANCH }} branch and deploy it
         if: env.PROD_PUBLISH_REQUIRED != 'false' || 
env.STAGING_PUBLISH_REQUIRED != 'false'
         working-directory: dist
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -x
           echo "Running git config"
           git config user.name "GitHub Actions"
           git config user.email "[email protected]"
+          # actions/checkout@v6 stores credentials via includeIf gitdir 
conditions that
+          # break when the repo is symlinked to /mnt. Set the token explicitly.
+          git remote set-url origin 
"https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
           echo "Running git add"
           git add .
           git diff HEAD

Reply via email to