actions / actions/runner

Support for pre-services setup steps

Open
#320 18 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement future Runner :heart: Container
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

The services capability is an elegant way to automate the setup and tear down of a service, but there are use-cases where preparation tasks need to occur in a hook before services are started.

Possible examples include:

  • Adjusting system parameters (e.g. file descriptor limits, socket buffer sizes, etc)
  • Creating filesystem resources shared/used by containers
  • Configuring ACLs
  • Configuring network adapters and ip filters
  • Installing packages

See https://github.com/actions/virtual-environments/issues/348 for an example use case of a workaround (although note, it will be solved by other means)

One form this could take would be something like:

runs-on: ubuntu-latest
setup-steps:
  - name: Stop Mysql
     shell: bash
     run: |
       sudo service mysql stop || true
services:
  # services
steps:
  # post-services steps

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the runner handles the workflow sections shown in the example, especially services and steps; the issue names no files or tests. Define the ordering and execution semantics for a pre-services hook, then verify that preparation commands run before services start while existing post-services steps continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.