Skip to content

Commit 5f630ee

Browse files
authored
Fix copilot-setup-steps: replace reusable workflow with direct steps (#282)
This PR fixes the GitHub Copilot setup workflow by replacing the reusable workflow call with direct steps, as required by GitHub Copilot's limitations for copilot-setup-steps jobs. Changes: - Removed uses: insightsengineering/r.pkg.template/.github/workflows/copilot-setup-steps.yaml@main - Added direct steps for checkout, R setup, and dependency installation - Uses actions with uses: (which is allowed) instead of reusable workflows (which are not) This resolves the error: 'Calling a reusable workflow with the uses: keyword is not supported in copilot-setup-steps jobs.'
1 parent 6908764 commit 5f630ee

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
1-
---
21
name: Copilot Agent Setup
32

3+
# Configure the environment for GitHub Copilot coding agent
4+
# This ensures R is available when the agent works on this repository
5+
# Installs R using the standard GitHub Actions setup
6+
47
on:
58
workflow_dispatch:
69

710
jobs:
811
copilot-setup-steps:
9-
name: Copilot Agent Setup
10-
uses: insightsengineering/r.pkg.template/.github/workflows/copilot-setup-steps.yaml@main
12+
runs-on: ubuntu-latest
13+
14+
# Set the permissions to the lowest permissions possible needed for your steps.
15+
# Copilot will be given its own token for its operations.
16+
permissions:
17+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
18+
contents: read
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up R
25+
uses: r-lib/actions/setup-r@v2
26+
with:
27+
r-version: 'release'
28+
29+
- name: Install R dependencies
30+
uses: r-lib/actions/setup-r-dependencies@v2
31+
with:
32+
cache-version: 1
1133

34+
- name: Verify R installation
35+
run: |
36+
R --version
37+
R -e "sessionInfo()"
38+
39+
# Additional steps for the Copilot agent would be invoked here
40+
# The agent will have access to R in this environment

0 commit comments

Comments
 (0)