From 2985830cacc36d17997ce5c5f0ae557f7f88f712 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Tue, 31 Mar 2026 06:33:37 -0500 Subject: [PATCH 1/2] chore: use docker for github copilot coding agent Another attempt at using a container for faster startup. --- .github/docker/Dockerfile | 6 ++++++ .github/workflows/copilot-setup-steps.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/docker/Dockerfile b/.github/docker/Dockerfile index 80baade..9b650f3 100644 --- a/.github/docker/Dockerfile +++ b/.github/docker/Dockerfile @@ -70,3 +70,9 @@ RUN echo 'local({ \ RUN Rscript -e 'install.packages("pak")' COPY install-packages.R /tmp/install-packages.R RUN Rscript /tmp/install-packages.R && rm /tmp/install-packages.R + +# GitHub Copilot's injected "Prepare Copilot" step uses `set -o pipefail` via +# `shell: sh`, which dash (Debian's default /bin/sh) doesn't support. Redirect +# /bin/sh to bash, which is already installed and is a superset of POSIX sh. +# Placed last so no apt postinst script can overwrite the symlink during build. +RUN ln -sf /bin/bash /bin/sh diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index d5dffcf..7830bdb 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -15,6 +15,7 @@ jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest + container: ghcr.io/api2r/pkgskills-ci:release permissions: contents: read @@ -24,6 +25,7 @@ jobs: - uses: ./.github/workflows/install with: + use-container: "true" token: ${{ secrets.GITHUB_TOKEN }} cache-version: copilot needs: build, check, website From 4207692e570c607379b58de8752a7b3e094fc79d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:49:22 +0000 Subject: [PATCH 2/2] chore: reconcile inst/templates/workflows with .github/workflows (#67) Agent-Logs-Url: https://github.com/api2r/pkgskills/sessions/8c0e0849-a1ac-4d6e-87ce-4773c2785a58 Co-authored-by: jonthegeek <33983824+jonthegeek@users.noreply.github.com> --- NEWS.md | 1 + inst/templates/workflows/copilot-setup-steps.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 30d50a2..782bd2a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # pkgskills (development version) +* `use_github_copilot()` now installs a container-based `copilot-setup-steps.yml` for faster agent startup (#67). * `AGENTS.md` and `tdd-workflow` skill instructions now explicitly explain how to determine the GitHub issue number and warn agents never to guess or invent one (@copilot, #61). * `use_agent()` template is reconciled with this package's `AGENTS.md` file (#59). * `tdd-workflow` skill now documents `stbl::expect_pkg_error_snapshot()` with an explicit `package` argument instead of a helper-defined version (#51). diff --git a/inst/templates/workflows/copilot-setup-steps.yml b/inst/templates/workflows/copilot-setup-steps.yml index e299ee3..fb03545 100644 --- a/inst/templates/workflows/copilot-setup-steps.yml +++ b/inst/templates/workflows/copilot-setup-steps.yml @@ -15,6 +15,7 @@ jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest + container: ghcr.io/api2r/pkgskills-ci:release permissions: contents: read @@ -24,6 +25,7 @@ jobs: - uses: ./.github/workflows/install with: + use-container: "true" token: ${{ secrets.GITHUB_TOKEN }} cache-version: copilot needs: build, check, website