简体   繁体   中英

How to override the work directory (docker) in Github Actions

When I use a prebuilt Docker image the Github Actions by default set's the work directory to --workdir /github/workspace . Is it possible to change this value?

/usr/bin/docker run --name sshnirozap_action_b3f54a --label 2e4e3a --workdir /github/workspace sshniro/zap_action zap-baseline.py -t https://www.example.com

在此处输入图像描述

You can set the working directory by the keyword working-directory just like that:

 steps:
    - uses: actions/checkout@v1     
    - run: npm ci
      working-directory: ./nice_folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM