Skip to content

Commit eedebbf

Browse files
committed
ci: update workflow to conditionally add or update
1 parent f386f4f commit eedebbf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/install-workflows.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ jobs:
7575
RUN_BRANCH="ci/install-workflows-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
7676
git switch --create "$RUN_BRANCH"
7777
78-
gh aw add "${{ github.workspace }}/workflows/copilot-token-audit.md" "${{ github.workspace }}/workflows/copilot-token-optimizer.md"
78+
if [[ -f .github/workflows/copilot-token-audit.md && -f .github/workflows/copilot-token-optimizer.md ]]; then
79+
gh aw update copilot-token-audit copilot-token-optimizer
80+
else
81+
gh aw add "${{ github.workspace }}/workflows/copilot-token-audit.md" "${{ github.workspace }}/workflows/copilot-token-optimizer.md"
82+
fi
7983
gh aw compile
8084
8185
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)