Skip to content

Commit 44ed19b

Browse files
authored
Merge pull request #433 from QuantStrategyLab/fix/ibkr-reconciliation-workflow-matrix
fix: dispatch selected IBKR reconciliation targets safely
2 parents d980107 + bd787fa commit 44ed19b

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/collect-reconciliation-evidence.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ concurrency:
3232
jobs:
3333
collect:
3434
name: Read ${{ matrix.profile }} baseline evidence
35-
if: ${{ inputs.target == 'all' || inputs.target == matrix.profile }}
3635
runs-on: ubuntu-latest
3736
timeout-minutes: 10
3837
strategy:
@@ -48,16 +47,32 @@ jobs:
4847
- profile: russell_top50_leader_rotation
4948
service: interactive-brokers-quant-live-u18336562-service
5049
steps:
50+
- name: Select requested target
51+
id: selection
52+
env:
53+
REQUESTED_TARGET: ${{ inputs.target }}
54+
PROFILE: ${{ matrix.profile }}
55+
run: |
56+
set -euo pipefail
57+
if [ "$REQUESTED_TARGET" = "all" ] || [ "$REQUESTED_TARGET" = "$PROFILE" ]; then
58+
echo "selected=true" >> "$GITHUB_OUTPUT"
59+
else
60+
echo "selected=false" >> "$GITHUB_OUTPUT"
61+
fi
62+
5163
- name: Authenticate to Google Cloud
64+
if: ${{ steps.selection.outputs.selected == 'true' }}
5265
uses: google-github-actions/auth@v3
5366
with:
5467
workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}
5568
service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }}
5669

5770
- name: Set up gcloud
71+
if: ${{ steps.selection.outputs.selected == 'true' }}
5872
uses: google-github-actions/setup-gcloud@v3
5973

6074
- name: Collect no-order reconciliation candidate
75+
if: ${{ steps.selection.outputs.selected == 'true' }}
6176
env:
6277
SERVICE: ${{ matrix.service }}
6378
PROFILE: ${{ matrix.profile }}
@@ -82,6 +97,7 @@ jobs:
8297
"reports/${PROFILE}.json" | awk -F '\t' '{print "candidate_collected permits_active_lkg=" $1 ", expected_digests_configured=" $2 ", blockers=" $3}'
8398
8499
- name: Retain redacted candidate
100+
if: ${{ steps.selection.outputs.selected == 'true' }}
85101
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
86102
with:
87103
name: ibkr-reconciliation-${{ matrix.profile }}-${{ github.run_id }}

0 commit comments

Comments
 (0)