Skip to content

Commit de0c129

Browse files
Copilotbramp
andauthored
Add copilot-setup-steps.yml to configure agent environment
Agent-Logs-Url: https://github.com/bramp/ffmpeg-cli-wrapper/sessions/ad7a0e4c-5c9d-4345-bd38-ddd420848ae8 Co-authored-by: bramp <160627+bramp@users.noreply.github.com>
1 parent cd9df1c commit de0c129

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
contents: read
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Set up JDK 21
29+
uses: actions/setup-java@v4
30+
with:
31+
java-version: '21'
32+
distribution: 'temurin'
33+
cache: maven
34+
35+
# Pre-download all Maven dependencies (including from central.sonatype.com and
36+
# checkstyle.org) during setup, which is exempt from the agent's firewall.
37+
# This ensures the agent can build, test, and lint without needing network access
38+
# to those hosts at runtime.
39+
- name: Pre-download Maven dependencies
40+
run: mvn --batch-mode dependency:go-offline -Dgpg.skip
41+
42+
- name: Pre-download Maven plugin dependencies
43+
run: mvn --batch-mode fmt:check checkstyle:check --fail-never -Dgpg.skip

0 commit comments

Comments
 (0)