actions / actions/runner

Do not build container actions ahead of time

Open
#814 4 comments 3 reactions 1 assignee View on GitHub

@nikola-jokic is already working on this.

Since Apr 4, 2022.

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

Description

jobs:

  job:
    runs-on: ubuntu-latest
    steps:
    
    # BUG: GitHub's runner tries to build the last action before starting the first step.
    # It fails, because container image image_name does not exist yet.
    
    - name: Build hdlc/doc
      run: |
        docker build -t image_name - <<-EOF
        FROM asciidoctor/docker-asciidoctor
        RUN apk add -U --no-cache graphviz
        EOF
        
    - uses: actions/checkout@v2

    - uses: docker://image_name
      with:
        args: doc/make.sh

As a result, it is currently not possible to use local containers using the uses: docker:// syntax.

The alternative is to call docker explicitly, which requires handling all the environment manually (if necessary):

jobs:

  job:
    runs-on: ubuntu-latest
    steps:

    - name: Build hdlc/doc
      run: |
        docker build -t image_name - <<-EOF
        FROM asciidoctor/docker-asciidoctor
        RUN apk add -U --no-cache graphviz
        EOF

    - uses: actions/checkout@v2

    - name: Build site
      run: docker run -v /$(pwd)://documents/ image_name ./doc/make.sh

Using local docker images in container steps should be supported too.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.