Skip to content

Remove image when the container block is empty #78

Description

@yeikel

From: https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container

jobs:
  container-test-job:
    runs-on: ubuntu-latest
    container:
      image: node:14.16     
jobs:
  container-test-job:
    runs-on: ubuntu-latest
    container: node:14.16

If there is more configuration within the container block, it should stay as is. Example:

jobs:
  container-test-job:
    runs-on: ubuntu-latest
    container:
      image: node:14.16
      env:
        NODE_ENV: development
      ports:
        - 80
      volumes:
        - my_docker_volume:/volume_mount
      options: --cpus 1
    steps:
      - name: Check for dockerenv file
        run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Recipes Wanted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions