From 38a2548199530890d33b61bcafd7f3ace0c08657 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Mon, 6 Jul 2026 13:33:30 +0200 Subject: [PATCH] fix(ci): set up git credential helper for checkout v7 compatibility actions/checkout v7 changed credential persistence from http.extraheader to includeIf.gitdir-scoped config files. The collection-docs-action does not pick up the new credential format, breaking git push to gh-pages. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Felix Matouschek --- .github/workflows/docs.yml | 8 ++++++++ .github/workflows/release.yml | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 846bd96..4a76a57 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -50,6 +50,14 @@ jobs: cp -rp ansible_collections \ ${{ env.work_dir }} + - name: Set up git credentials for gh-pages push + run: | + cd ${{ env.collection_dir }} + git config credential.helper \ + '!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create changelog and documentation uses: ansible-middleware/collection-docs-action@main with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7002b5..827e578 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,13 @@ jobs: run: | ansible-galaxy collection build . + - name: Set up git credentials + run: | + git config credential.helper \ + '!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create changelog and documentation uses: ansible-middleware/collection-docs-action@main with: