Skip to content

Commit 68f7665

Browse files
committed
1
1 parent b330d26 commit 68f7665

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

.github/workflows/fetch_and_log.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- name: Fetch Unprocessed Workflow Runs
2525
id: fetch-unprocessed-run-ids
2626
run: |
27+
#WORKFLOW_IDS=$(gh run list --repo $GITHUB_REPOSITORY --limit 100 --json databaseId,createdAt,displayTitle --jq "[.[] | select(.databaseId > $LAST_PROCESSED_RUN_ID and .displayTitle != \"Fetch and Log Workflow Runs\") | .databaseId] | @json")
2728
WORKFLOW_IDS=$(gh run list --repo $GITHUB_REPOSITORY --limit 100 --json databaseId,createdAt,displayTitle --jq "[.[] | select(.databaseId > $LAST_PROCESSED_RUN_ID and .displayTitle != \"Fetch and Log Workflow Runs\")] | sort_by(.databaseId) | .[].databaseId | @json")
2829
echo "Workflow runs to process: $WORKFLOW_IDS"
2930
echo "workflow_ids=$WORKFLOW_IDS" >> $GITHUB_OUTPUT
@@ -33,7 +34,6 @@ jobs:
3334
process-logs:
3435
needs: fetch-workflows
3536
runs-on: ubuntu-latest
36-
if: ${{ needs.fetch-workflows.outputs.workflow_ids != '[]' && needs.fetch-workflows.outputs.workflow_ids != '' }}
3737
strategy:
3838
matrix:
3939
run_id: ${{ fromJson(needs.fetch-workflows.outputs.workflow_ids || '[]') }}
@@ -48,13 +48,4 @@ jobs:
4848
run: |
4949
gh variable set LAST_PROCESSED_RUN_ID --repo $GITHUB_REPOSITORY --body "${{ matrix.run_id }}"
5050
env:
51-
GH_TOKEN: ${{ secrets.GH_PAT }}
52-
53-
# Add a fallback job that runs when there are no workflow IDs
54-
process-logs-empty:
55-
needs: fetch-workflows
56-
runs-on: ubuntu-latest
57-
if: ${{ needs.fetch-workflows.outputs.workflow_ids == '[]' || needs.fetch-workflows.outputs.workflow_ids == '' }}
58-
steps:
59-
- name: No workflows to process
60-
run: echo "No new workflow runs to process"
51+
GH_TOKEN: ${{ secrets.GH_PAT }}

0 commit comments

Comments
 (0)