Github Action running container with options

Viewed 608

In docs there is described how to run container with additional options: Workflow syntax for GitHub Actions - GitHub Docs

jobs:
  build:
    name: Container with name
    runs-on: ubuntu-latest
    container: 
      image: ghcr.io/repo/image:latest
      credentials:
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
      options: --name myContainerName

But snippet above create and start docker without name argument... and of course other argument doesn't work, like --workdir.

Name of container is generated like this: 31ec555a1aav41a5bffe95da6f8b775b_ghcriorepoimage10_c998dc

Updated:
It's funny, because when i read logs, there are twice --name argument:

/usr/bin/docker create --name 31ec555a1aav41a5bffe95da6f8b775b_ghcriorepoimage10_c998dc --label f88420 --network github_network_a6029d55c6024481ba937e113e978280 --name myContainerName...
0 Answers
Related