From 13ba6f39bce6cbf04a9253aae152a7ee2d7cc1eb Mon Sep 17 00:00:00 2001 From: pdmurray Date: Thu, 26 Sep 2024 13:17:46 -0700 Subject: [PATCH] Just try a different commit+push action --- .github/workflows/generate_api_docs.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_api_docs.yaml b/.github/workflows/generate_api_docs.yaml index 527e8781b..a88e8388e 100644 --- a/.github/workflows/generate_api_docs.yaml +++ b/.github/workflows/generate_api_docs.yaml @@ -14,6 +14,8 @@ jobs: # and only run it when the PR is against the main branch of our repo if: "!contains(github.event.head_commit.message, '[openapi skip]') && github.repository=='conda-incubator/conda-store'" permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. contents: write defaults: run: @@ -26,8 +28,9 @@ jobs: - name: "Checkout repository 🛎️" uses: actions/checkout@v4 - with: - fetch-depth: 0 + # Must set the ref so that this works in github actions; see + # https://github.com/stefanzweifel/git-auto-commit-action/tree/master?tab=readme-ov-file#example-workflow + ref: ${{ github.head_ref }} - name: "Set up Miniconda 🐍" uses: conda-incubator/setup-miniconda@v3 @@ -44,9 +47,7 @@ jobs: mv docusaurus-docs/static/openapi.json.formatted docusaurus-docs/static/openapi.json - name: "Commit changes" - uses: EndBug/add-and-commit@v9 + uses: stefanzweifel/git-auto-commit-action@v5 with: - default_author: github_actions - message: 'Update REST API documentation (openapi.json)' - add: 'docusaurus-docs/static/openapi.json' - push: true + commit_message: 'Update REST API documentation (openapi.json)' + file_pattern: 'docusaurus-docs/static/openapi.json'