Repository navigation
28 lines (23 loc) · 1.83 KB
/
Copy pathcopilot-setup-steps.yml
File metadata and controls
28 lines (23 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: "Copilot Setup Steps"
# Allow testing of the setup steps from your repository's "Actions" tab.
on: workflow_dispatch
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
# run on AMD when the run_id ends in 0,2,4,6,8, Intel when it ends in 1,3,5,7,9 so as not to over use one pool too much
runs-on: ${{ (endsWith(github.run_id, '0') || endsWith(github.run_id, '2') || endsWith(github.run_id, '4') || endsWith(github.run_id, '6') || endsWith(github.run_id, '8')) && fromJSON(format('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-amd", "JobId=copilot-setup-steps-{0}-{1}-{2}"]', github.run_id, github.run_number, github.run_attempt)) || fromJSON(format('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-intel", "JobId=copilot-setup-steps-{0}-{1}-{2}"]', github.run_id, github.run_number, github.run_attempt)) }}
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# 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.
contents: read
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: hyperlight-dev/ci-setup-workflow@59673866360458f8dd035f4a9fa766aeebad2038 # v2.3.1
with:
additional-toolchain-directory: src/tests/rust_guests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}