Skip to content

Commit af21aac

Browse files
committed
Refactor CI workflow to run published workflows directly on main branch
1 parent ff4fb37 commit af21aac

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
run:
4949
runs-on: ubuntu-latest
5050
needs: [compile]
51+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
5152
steps:
5253
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5354

@@ -57,16 +58,9 @@ jobs:
5758
version: v0.71.4
5859
github-token: ${{ secrets.GITHUB_TOKEN }}
5960

60-
- name: Install published workflows into .github/workflows
61-
run: |
62-
gh aw add "${{ github.workspace }}/workflows/copilot-token-audit.md" "${{ github.workspace }}/workflows/copilot-token-optimizer.md"
63-
gh aw compile
64-
env:
65-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
6761
- name: Run published workflows on this repo
6862
run: |
69-
gh aw run copilot-token-audit --ref "${{ github.ref_name }}"
70-
gh aw run copilot-token-optimizer --ref "${{ github.ref_name }}"
63+
gh aw run copilot-token-audit --ref main
64+
gh aw run copilot-token-optimizer --ref main
7165
env:
7266
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)