Skip to content

Commit 93ea99c

Browse files
Copilotheaths
andcommitted
Use heaths/azure-sdk-for-rust:latest container with volume mapping and remove unnecessary setup steps
Co-authored-by: heaths <[email protected]>
1 parent b81f597 commit 93ea99c

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
name: Copilot Setup Steps
22

33
# This workflow sets up the development environment for GitHub Copilot coding agent
4-
# It leverages the existing devcontainer configuration to ensure consistency
5-
# with the development environment and avoid duplication of tooling setup
4+
# It uses a pre-built container image with all the necessary tools already installed
65
#
76
# The workflow:
8-
# - Uses the same base container image as the devcontainer (mcr.microsoft.com/devcontainers/rust)
9-
# - Runs the devcontainer post-create script for environment setup
10-
# - Installs the same development tools specified in the devcontainer
7+
# - Uses the heaths/azure-sdk-for-rust:latest container image with all dependencies
8+
# - Maps the repository into the standard devcontainer workspace location
119
# - Caches Cargo dependencies for improved performance
1210
# - Runs comprehensive workspace verification (check, clippy, fmt)
1311
# - Tests basic functionality to ensure the environment is ready
1412
#
15-
# This approach maintains consistency with the existing devcontainer setup
16-
# and avoids maintaining duplicate tool installation logic
13+
# This approach leverages a pre-built image that contains all the tools from
14+
# the devcontainer configuration, avoiding the need to install tools at runtime
1715
#
1816
# Triggers:
1917
# - Manual execution via workflow_dispatch
@@ -52,25 +50,15 @@ jobs:
5250
contents: read
5351
environment: Copilot
5452
container:
55-
image: mcr.microsoft.com/devcontainers/rust:1-1-bullseye
53+
image: heaths/azure-sdk-for-rust:latest
54+
volumes:
55+
- ${{ github.workspace }}:/workspaces/azure-sdk-for-rust
56+
options: --workdir /workspaces/azure-sdk-for-rust
5657

5758
steps:
5859
- name: Checkout repository
5960
uses: actions/checkout@v4
6061

61-
- name: Setup development environment using devcontainer configuration
62-
run: |
63-
# Run the devcontainer post-create script to set up additional toolchains
64-
chmod +x .devcontainer/oncreate
65-
./.devcontainer/oncreate
66-
67-
- name: Install additional tools for Azure SDK development
68-
run: |
69-
# Install tools commonly needed for Rust development and Azure SDK
70-
# Note: cargo-watch and http-server are already installed in the container
71-
cargo install cargo-audit || echo "cargo-audit already installed or failed to install"
72-
cargo install cargo-outdated || echo "cargo-outdated already installed or failed to install"
73-
7462
- name: Cache Cargo dependencies
7563
uses: actions/cache@v4
7664
with:
@@ -117,8 +105,6 @@ jobs:
117105
echo "=== Installed Components ==="
118106
rustup component list --installed
119107
echo "=== Available Tools ==="
120-
which cargo-audit && cargo-audit --version || echo "cargo-audit not available"
121-
which cargo-outdated && cargo-outdated --version || echo "cargo-outdated not available"
122108
which cargo-watch && cargo-watch --version || echo "cargo-watch not available"
123109
which http-server && http-server --version || echo "http-server not available"
124110
echo "=== System Dependencies ==="

0 commit comments

Comments
 (0)