Skip to content

Commit

Permalink
Checkout individual state file to avoid recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
kalikiana committed May 2, 2024
1 parent 937000f commit 57a2cfa
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
description: Output folder for HTML files
required: false
default: 'gh-pages'
state:
description: Output folder for state keeping
required: false
default: 'state'
redmine_api_key:
description: The Redmine API key
required: true
Expand Down Expand Up @@ -48,17 +52,20 @@ runs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.folder }}
path: ${{ inputs.folder }}
fetch-depth: '1'
- run: rm -rf ${{ inputs.folder }}/.git
path: ${{ inputs.state }}
# https://github.com/actions/checkout#fetch-only-a-single-file
sparse-checkout: |
state.json
sparse-checkout-cone-mode: false
- run: rm -rf ${{ inputs.state }}/.git
shell: bash
- name: Render Markdown from configured backlog queries
run: |
python backlogger/backlogger.py ${{ inputs.config }} ${{ inputs.args }}
echo "BACKLOG_STATUS=$?" >> "$GITHUB_ENV"
env:
REDMINE_API_KEY: ${{ inputs.REDMINE_API_KEY }}
STATE_FOLDER: ${{ inputs.folder }}
STATE_FOLDER: ${{ inputs.state }}
WEBHOOK_URL: ${{ inputs.webhook_url }}
shell: bash
continue-on-error: true
Expand All @@ -80,7 +87,6 @@ runs:
shell: bash
- name: Render HTML
run: |
mkdir -p ${{ inputs.folder }}
cd ${{ inputs.folder }}
cat ../backlogger/head.html > index.html
kramdown ../index.md >> index.html
Expand Down

0 comments on commit 57a2cfa

Please sign in to comment.