GitHub Actions, Copilot, Codespaces and github.dev: Automation and AI Tools (GH-900)
GitHub's automation and AI tools are the features that do development work for you or give you somewhere to do it: GitHub Actions runs automated workflows when something happens in a repository, GitHub Copilot is an AI assistant that suggests code, answers questions and can complete whole tasks, GitHub Codespaces gives you a full development environment in the cloud, and github.dev is a free, lightweight editor in the browser. This lesson covers what each one is for, the vocabulary of an Actions workflow and how runners are billed, Copilot's suggestions, chat modes, agents and model choice, the difference between the individual, Business and Enterprise Copilot plans, how dev containers configure and personalise a codespace, and when github.dev is enough and when you need a codespace.
On this page10 sections
- GitHub Actions: what it automates and how a workflow is built
- GitHub-hosted vs self-hosted runners, and how Actions is billed
- GitHub Copilot code suggestions in the editor
- Copilot agents: ask, plan and agent modes, and Copilot cloud agent
- Multi-model support: choosing the AI model
- Copilot plans: individual vs Business vs Enterprise
- GitHub Codespaces: a development environment in the cloud
- Dev containers: configuring a codespace with devcontainer.json
- Personalising codespaces and speeding them up: dotfiles, Settings Sync and prebuilds
- The github.dev editor and how it differs from Codespaces
- Describe what GitHub Actions automates and name the parts of a workflow: event, workflow file, job, step, action and runner
- Choose between GitHub-hosted and self-hosted runners and explain how Actions usage is billed in public and private repositories
- Explain how Copilot offers inline code suggestions, how the public code policy treats matching suggestions, and how ask, plan and agent modes differ from Copilot cloud agent
- Use multi-model support correctly: the model picker, Auto, and what a chat model does and does not change
- Match a buyer to the right Copilot plan: an individual plan, Copilot Business or Copilot Enterprise
- Set up and customise a codespace with devcontainer.json, dotfiles, Settings Sync and prebuilds, and explain idle timeout, rebuilds and storage billing
- Decide when the github.dev editor is enough and when to continue in a codespace
GitHub Actions: what it automates and how a workflow is built
GitHub Actions is GitHub's built-in automation platform: it runs a workflow of jobs on a machine whenever a chosen event happens in a repository. The best-known use is continuous integration and continuous delivery (CI/CD) — build and test every push or pull request, then deploy or publish — but Actions is not limited to code pipelines. Because almost anything on GitHub can be an event, a workflow can also automate repository housekeeping.
Typical uses:
- Test pull requests: a workflow triggered by the
pull_requestevent runs the test suite, and the result appears as a check on the pull request before anyone merges it. - Build and publish: a workflow triggered when a release is published builds a package or container image and pushes it to a registry.
- Repository automation: a workflow triggered when an issue is opened adds a label, posts a welcome comment or adds the issue to a project.
- Scheduled jobs: a
scheduletrigger (cron syntax) runs a workflow at fixed times — for example a nightly link check — whether or not anyone pushed that day. - Manual runs: a
workflow_dispatchtrigger adds a Run workflow button.
Actions is the tool that runs automation. It is not where a person edits code (that is Codespaces or github.dev), it does not suggest code (that is Copilot), and it does not track work (that is Projects).
Workflow vocabulary: events, workflows, jobs, steps, actions and runners
An Actions workflow is a chain of six terms, and each one has a precise meaning:
| Term | What it is |
|---|---|
| Event | An activity in the repository (or a schedule, or a manual trigger) that starts a workflow — a push, a pull request, an opened issue, a published release |
| Workflow | A YAML file in .github/workflows that says which events trigger it and which jobs to run; a repository can have many |
| Job | A set of steps that runs on one runner |
| Step | A single shell command or action inside a job; steps run in order and share the job's runner |
| Action | A reusable unit of automation (for example checking out the code or setting up a language) that a step calls with uses:; many are shared in GitHub Marketplace |
| Runner | The machine that executes a job — GitHub-hosted or self-hosted |
Two rules are worth knowing exactly:
- Location: GitHub only runs workflow files committed under
.github/workflows. Other folders have other jobs —.github/ISSUE_TEMPLATEholds issue templates and.devcontainerconfigures codespaces. - Job order: jobs have no dependencies unless you declare them, so by default they run in parallel, each on its own runner. To make one job wait for another, declare it with
needs:. The order of jobs in the file does not set their order. Steps, by contrast, always run one after another within their job.
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run lintIn this workflow, build and lint start at the same time on two separate runners; within each job the steps run top to bottom.
GitHub-hosted vs self-hosted runners, and how Actions is billed
Use a GitHub-hosted runner when you want GitHub to supply and maintain the machine, and a self-hosted runner when the job needs an operating system, hardware or network access that GitHub's machines do not provide.
| GitHub-hosted runner | Self-hosted runner | |
|---|---|---|
| Who provides it | GitHub, as a virtual machine with Ubuntu, Windows or macOS images | You — a physical machine, VM or container in your own data center or cloud |
| Lifecycle | A fresh VM for every job, discarded afterwards | Persists between jobs unless you set it up otherwise |
| Maintenance | GitHub patches and updates the images | You install, patch and secure it |
| Fits when | Standard builds; no infrastructure to look after | Special hardware, a custom OS or software, access to internal systems |
| Actions minutes | Standard runners free in public repositories; private repositories use included minutes | Free to use with Actions (you pay for your own machine) |
GitHub also offers larger runners — GitHub-hosted machines with more CPU and memory — but they are still GitHub's machines, not yours.
Billing follows two rules. Standard GitHub-hosted runners are free in public repositories. In private repositories, the account's plan (including GitHub Free) includes a monthly quota of minutes and storage; usage beyond the quota is billed, subject to the account's spending limits. The plan does not make private usage free, and a public repository does not consume the quota. Self-hosted runners do not use the minutes quota at all.
GitHub Copilot code suggestions in the editor
GitHub Copilot is an AI pair programmer, and its most basic feature is inline code suggestions: as you write, Copilot reads the context around the cursor and offers the rest of the line or a whole block as dimmed ghost text. There are two ways to prompt it without opening chat:
- Start typing code — Copilot completes the line, function or block you have begun.
- Write a comment that describes the logic, then start the next line — Copilot proposes code that implements the comment.
In VS Code you accept a suggestion with Tab, reject it with Esc, and step through alternative suggestions with Alt+] and Alt+[ (Option on macOS). Cycling only shows another option; it does not insert anything.
Other Copilot features are not inline suggestions: Copilot Chat answers in a chat panel (for example /explain on a selection), Copilot code review leaves comments when you request Copilot as a pull request reviewer, and assigning an issue to Copilot starts the cloud agent described below.
Suggestions that match public code
Because Copilot learned from public code, a suggestion can occasionally match code in a public repository. A public code policy (set by the individual, or by the organization or enterprise for its members) decides what happens: block suggestions that match public code, or allow them and show references to where the matching code appears so the developer can check its license and decide. The check compares against public repositories on GitHub.com — not private code or code hosted elsewhere.
Copilot agents: ask, plan and agent modes, and Copilot cloud agent
Copilot Chat in an IDE has modes that differ in how much Copilot does by itself. Agent mode is the one that acts: given a task, it decides which files are relevant, edits code across them, runs terminal commands such as builds and tests, reads the results and keeps iterating to fix errors until the task is done — all inside your IDE, with you able to review and approve.
| Surface | What it does | Where the work happens |
|---|---|---|
| Ask mode | Answers questions about code and concepts and suggests code; leaves your files unchanged unless you apply a suggestion | Your IDE |
| Plan mode | Researches the task and writes a step-by-step implementation plan for you to review before any code is written | Your IDE |
| Agent mode | Autonomously completes a task: reads files, edits code, runs commands, corrects itself | Your IDE, while your session is open |
| Inline chat | Changes or explains the code you selected, in place | Your editor, on a selection |
| Copilot cloud agent | Researches, plans and implements a task in the background and opens a pull request | An ephemeral cloud environment on GitHub — no editor needed |
The deciding question for agent mode versus ask mode is whether Copilot should change files and run commands (agent) or only answer (ask). The deciding question for agent mode versus cloud agent is where the work runs: agent mode needs your IDE session; the cloud agent works on GitHub while nobody has an editor open.
Copilot cloud agent: delegating a task to run in the background
Copilot cloud agent is the Copilot agent that works on GitHub rather than in your editor: you hand it a task, it researches the repository, plans and makes the change in its own ephemeral development environment (powered by GitHub Actions), and delivers the result as a pull request. GitHub's documentation now calls it the cloud agent; you may also see it described as the Copilot coding agent.
- Starting it: assign an issue to Copilot, start a task from the agents panel or a Copilot Chat conversation, or mention
@copilotin a comment on a pull request it is working on to have it change that pull request. - Delivering work: it creates a branch, writes the commits and opens a pull request for the task. It never merges by itself — the pull request goes through the repository's normal review, required checks and branch protection, and you can ask it for changes by commenting.
- Customising its environment: a
copilot-setup-steps.ymlworkflow can preinstall the tools and dependencies the agent needs.
It suits well-scoped work — a bug fix, a small feature, extra tests, documentation updates — that a person would otherwise pick up from the backlog. The pull request is the deliverable: you review it like any other contribution.
Multi-model support: choosing the AI model
Multi-model support means Copilot Chat can use different AI models from several providers, and you choose one per conversation from the model picker in the chat view. Different models trade speed against depth of reasoning, and some draw more heavily on a plan's monthly AI allowance (GitHub AI Credits) than others.
- Auto: instead of a named model, choose Auto and Copilot selects a model for you based on availability, which helps reduce rate limiting.
- Chat only: changing the chat model does not change the model behind inline code suggestions.
- Organization control: on Copilot Business and Copilot Enterprise, administrators decide through policy which models are available; for Copilot Business members, the organization must allow members to switch to other models. An empty model picker for a Business seat therefore points at the organization's policy.
Copilot plans: individual vs Business vs Enterprise
The plan depends first on who buys and manages Copilot. A person buying for themselves uses an individual plan; an organization buying seats for its members uses Copilot Business; an enterprise on GitHub Enterprise Cloud can use Copilot Enterprise.
| Individual plans (Copilot Free, Pro, Pro+, Max) | Copilot Business | Copilot Enterprise | |
|---|---|---|---|
| Bought by | The individual, on a personal account | An organization (or an enterprise), per seat | An enterprise on GitHub Enterprise Cloud, per seat |
| Management | The user manages their own settings | Organization-wide policy management, content exclusion (keep chosen files out of Copilot), audit logs | Everything in Business |
| Allowance | Free is limited; the paid individual plans step it up | Organization plan allowance | A larger monthly AI allowance than Business, plus additional enterprise capabilities |
| Fits when | A freelancer or hobbyist with no organization providing Copilot | A company managing Copilot centrally, including one without GitHub Enterprise Cloud | An enterprise on GHEC that wants the largest allowance and every Enterprise-tier feature |
Points that decide scenarios:
- The exam's "Copilot for Individuals" is today's individual plans. Copilot Free needs no payment; Copilot Pro, Pro+ and Max are paid upgrades with progressively larger allowances. GitHub also gives eligible verified students free access.
- Copilot Pro is not GitHub Pro. GitHub Pro is a personal account plan for GitHub features; it does not buy Copilot.
- Individual plans have no organization-wide policies or content exclusion — those start at Business.
- Enterprise is designed for enterprises using GitHub Enterprise Cloud. Without GHEC, a company that needs central management chooses Business.
- On GitHub Enterprise Cloud, the enterprise owner chooses the plan per organization, so one organization can have Enterprise while another has the lower-priced Business.
GitHub Codespaces: a development environment in the cloud
A codespace is a cloud-hosted development environment: a Docker container running on a virtual machine that GitHub hosts, with the repository cloned in, a terminal, and the compute to build, run and debug code. Nothing has to be installed locally, so it works from a Chromebook or a borrowed laptop.
You can open a codespace in three ways: in the browser (a VS Code editor), in VS Code desktop, or from a terminal with the GitHub CLI — gh codespace create creates one and gh codespace ssh connects to it (JetBrains IDEs are also supported).
Lifecycle and billing
- Compute is billed only while a codespace is active. Storage is billed for as long as the codespace exists — including while it is stopped.
- Idle timeout: a codespace with no activity stops after a timeout that defaults to 30 minutes. You can change it in your settings (organizations can set a shorter maximum). Stopping is not deleting: files and changes stay.
- Separately, a running codespace has a maximum lifetime of 12 hours; that is not the idle timeout.
- Automatic deletion: stopped codespaces that stay inactive are deleted after a retention period that defaults to 30 days.
- Personal accounts get a monthly quota of free Codespaces usage. To stop unneeded codespaces counting against it right away, delete them — a stopped codespace still uses storage, and a shorter idle timeout only affects running ones.
Dev containers: configuring a codespace with devcontainer.json
A dev container configuration is the file that tells Codespaces how to build the container for a repository, so everyone who opens a codespace gets the same tools. It lives at .devcontainer/devcontainer.json (or .devcontainer.json in the repository root), and a repository can offer several configurations in subfolders of .devcontainer.
A devcontainer.json can set:
- the base image, or a Dockerfile or Docker Compose file to build from;
- features — packaged tools and runtimes to add, such as a language version or a CLI;
- VS Code extensions and settings to install for everyone;
- ports to forward, and lifecycle commands such as
postCreateCommandto run setup scripts.
{
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": { "extensions": ["dbaeumer.vscode-eslint"] }
},
"forwardPorts": [3000],
"postCreateCommand": "npm ci"
}No configuration, and changing it
- No configuration is fine: GitHub builds the codespace from a default Linux image that already includes popular runtimes (for example Python, Node.js and Java) and tools such as Git and GitHub CLI. Add a
devcontainer.jsonwhen the team needs a specific, repeatable setup. - Applying a change: an existing codespace does not pick up configuration changes by itself. Run Codespaces: Rebuild Container (or
gh codespace rebuild). A rebuild keeps the/workspacesdirectory, where the repository is cloned, but clears changes elsewhere, such as files in your home directory — move anything you want to keep into/workspacesfirst. A new codespace does not include files from your other codespaces.
Personalising codespaces and speeding them up: dotfiles, Settings Sync and prebuilds
Codespaces separates team configuration, committed to the repository in devcontainer.json and shared by everyone, from personal customisation, which follows one user into every codespace without changing any team repository.
| Need | Use | Scope |
|---|---|---|
| Same runtimes, extensions and ports for the whole team | devcontainer.json in the repository | Everyone who opens that repository |
| My shell aliases, prompt, Git config and tool setup everywhere | A dotfiles repository, enabled in my Codespaces settings | Every codespace I create, in any repository |
| My VS Code themes, keyboard shortcuts, settings and extensions | VS Code Settings Sync, signed in | My VS Code everywhere, including codespaces |
| Faster codespace creation for a large repository | Prebuilds | A repository, branch and configuration |
- Dotfiles: keep configuration files (and optionally an install script) in a repository you own — it does not have to be public — and turn it on in your Codespaces settings; GitHub clones it into every new codespace you create. GitHub's docs note that dotfiles do not personalise user-scoped VS Code settings; that is what Settings Sync is for.
- Prebuilds: a prebuild configuration runs a GitHub Actions workflow that builds the codespace for a chosen repository, branch and
devcontainer.json, runs the setup commands and saves a snapshot. New codespaces start from that snapshot, so slow dependency installs no longer happen at creation time. Prebuilds use Actions minutes and storage.
The github.dev editor and how it differs from Codespaces
github.dev is a free, lightweight VS Code editor that runs entirely in your browser, for quick edits without any compute behind it. Open it by pressing the period (.) key while viewing a repository or pull request on GitHub.com, pressing > to open it in a new tab, or changing github.com to github.dev in the URL. You can edit many files, review a pull request and commit through the Source Control view.
| github.dev | GitHub Codespaces | |
|---|---|---|
| Starts | Instantly, in the browser | In seconds to minutes (a container must be created) |
| Cost | Free | Compute billed while active, storage while it exists (personal free quota) |
| Compute and terminal | None — cannot build, run, test or debug | A dedicated VM with a terminal |
| Extensions | Only web-compatible extensions | Most VS Code Marketplace extensions |
| Configuration | No dev container | Built from devcontainer.json or the default image |
| Best for | Typo fixes, documentation, small multi-file edits, reviewing | Building, running, testing and debugging |
The rule of thumb: start in github.dev for edits, and as soon as the work needs to run something — a build script, tests, a preview server — continue in a codespace (github.dev offers a Continue Working On option for this).
Tip. Most items are short scenarios that describe a team's need and ask which GitHub tool, Actions term, Copilot feature or plan, or Codespaces setting fits it, so the skill is telling closely related options apart: the four tools by purpose, the parts of a workflow, the two kinds of runner, the Copilot chat modes and the cloud agent, the Copilot plans, and the ways to configure, personalise and speed up a codespace. Some items check a single product fact, such as where workflow files live, how Copilot's work is delivered, or a Codespaces default. Harder items combine two rules — for example billing plus repository visibility, or an organization policy plus the scope of a setting — and a few ask you to select two answers. Read every constraint in the scenario (who pays, where the work must run, how fast, and whose settings may change) before choosing.
- GitHub Actions runs workflows when events happen — CI/CD, publishing on release, labelling new issues, scheduled jobs — from YAML files that must live in .github/workflows.
- Event triggers workflow; a workflow's jobs run in parallel by default, each on its own runner, unless needs: makes one wait; steps run in order within a job; actions are reusable units steps call.
- GitHub-hosted runners are fresh, GitHub-maintained Ubuntu/Windows/macOS VMs; self-hosted runners are your own machines for special hardware or software, maintained by you.
- Standard GitHub-hosted runners are free in public repositories; private repositories use the plan's included minutes, then are billed; self-hosted runners use no minutes.
- Copilot suggests code inline from what you type or a descriptive comment (Tab accepts, Esc rejects, Alt+] / Alt+[ cycle); a public code policy blocks matching suggestions or shows references.
- Ask mode answers, plan mode writes a plan, agent mode autonomously edits and runs commands in your IDE, and Copilot cloud agent works in the background on GitHub and delivers a pull request.
- Pick the chat model in the model picker or use Auto; the chat model never changes inline suggestions, and Business members can switch models only if their organization allows it.
- Individual plans (Free, Pro, Pro+, Max) are bought by a person; Copilot Business adds organization policy, content exclusion and audit logs; Copilot Enterprise needs GitHub Enterprise Cloud and is chosen per organization.
- A codespace is a container on a GitHub-hosted VM, opened in the browser, VS Code or GitHub CLI; it stops after 30 idle minutes by default, and stopped codespaces still use storage until deleted.
- devcontainer.json shares the team environment (rebuild to apply; /workspaces survives), dotfiles and Settings Sync personalise it, prebuilds speed it up, and github.dev is the free, compute-free editor for quick edits.
Frequently asked questions
What is GitHub Actions used for?
GitHub Actions automates work in a repository by running workflows when events happen. It is used for CI/CD — building and testing every push or pull request and deploying or publishing releases — and for repository automation such as labelling new issues or running a scheduled nightly check. Workflows are YAML files in the .github/workflows directory, and their jobs run on GitHub-hosted or self-hosted runners.
Do jobs in a GitHub Actions workflow run in order?
No. Jobs in a GitHub Actions workflow run in parallel by default, each on its own runner, regardless of their order in the file. A job waits for another only when it declares the dependency with the needs keyword. Steps inside a single job, however, always run in order on that job's runner.
When should I use a self-hosted runner instead of a GitHub-hosted runner?
Use a self-hosted runner when a GitHub Actions job needs hardware, an operating system, software or network access that GitHub's machines do not provide, such as special hardware in your own data center. GitHub-hosted runners are fresh Ubuntu, Windows or macOS virtual machines that GitHub maintains, so they suit teams that do not want to provision or patch build machines. Self-hosted runners do not use Actions minutes, but you maintain them.
What is the difference between Copilot agent mode and Copilot cloud agent?
Copilot agent mode runs inside your IDE while you have it open: it reads files, edits code, runs commands and fixes its own errors to complete a task you give it in chat. Copilot cloud agent runs in the background on GitHub in an ephemeral cloud environment, typically started by assigning it an issue, and delivers its work as a branch and pull request for review, with no editor open. Neither merges changes by itself.
Which GitHub Copilot plan should an organization choose?
An organization that wants to buy Copilot seats for its members and manage them centrally chooses Copilot Business, which adds organization-wide policies, content exclusion and audit logs. Copilot Enterprise is designed for enterprises using GitHub Enterprise Cloud and adds a larger monthly AI allowance and more capabilities on top of Business; the enterprise owner can assign Enterprise or Business per organization. Individual plans such as Copilot Pro are for people paying for themselves.
How do I customise a GitHub codespace for my whole team?
Commit a dev container configuration, usually .devcontainer/devcontainer.json, to the repository. It sets the image or Dockerfile, features, VS Code extensions and settings, forwarded ports and setup commands, so every codespace created from the repository is the same. Existing codespaces pick up changes only after a container rebuild, which keeps the /workspaces directory but clears changes elsewhere. Personal preferences belong in a dotfiles repository or VS Code Settings Sync instead.
What happens to a codespace when I stop using it?
A codespace with no activity stops after its idle timeout, which defaults to 30 minutes. Stopping ends compute billing but keeps the codespace and its files, and storage is still billed while it exists. Stopped, inactive codespaces are deleted automatically after a retention period that defaults to 30 days, so deleting them yourself is the fastest way to stop storage usage.
What is the difference between github.dev and GitHub Codespaces?
github.dev is a free VS Code editor that opens instantly in the browser (press the period key on a repository) but has no compute: there is no terminal, you cannot build, run or debug code, and only web-compatible extensions work. GitHub Codespaces gives you a container on a cloud virtual machine with a terminal, built from the repository's dev container configuration, and is billed for compute and storage. Use github.dev for quick edits and a codespace when the work needs to run.
Source
This lesson covers the "Apply modern development practices" domain of the official GH-900 exam guide. Vendors revise their guides — check the source for the current version.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.