Difference between runing containers

What there are differences between running container by Github Action, like this:

jobs:
  build:
    name: Test container
    runs-on: ubuntu-latest
    container: 
      image: ghcr.io/repo/image:latest
   steps: 
     [...]

and this:

jobs:
  build:
    name: Test container
    runs-on: ubuntu-latest
   steps: 
     - name: Docker run
       run: docker create ... && docker start ...

?

With the former any run steps in the job will run inside the configured container. To achieve a similar effect in the latter version you’d have to run commands with docker exec in the previously started container. Also with the container option for the job the workspace and a few other things will be mounted into the container automatically. :slightly_smiling_face: