Skip to content

Commit

Permalink
Checkout individual state file to avoid recursion
Browse files Browse the repository at this point in the history
- Only get the state file we need
- Use a separate folder for the previous state

See: https://progress.opensuse.org/issues/159888
  • Loading branch information
kalikiana committed May 3, 2024
1 parent 937000f commit 83a52eb
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 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 Down

0 comments on commit 83a52eb

Please sign in to comment.