Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

Github actions working-directory incorrectly documented? 'Unexpected value 'working-directory''

Hi I'm setting up the new syntax for github actions and as part of the workflow the steps or jobs need to be run in a subfolder, thinking the easiest way to do this is by using the working-directory option documented here.

https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepsworking-direct...

 

Assuming placement is correct I have a filed that follows this structure

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      [other steps]
      - name: yarn install, build, and test
        working-directory: gatsby  # Error Line Referred to by error response
        run: |
          yarn install
          yarn run build --if-present
          yarn lint

 Where i get the following error

Your workflow file was invalid: .github/workflows/gatsby-ci.yml (Line: 24, Col: 9): Unexpected value 'working-directory'

Any clarification on the matter will be much appreciated.

 

Thanks in advance.

2 Replies
Community Manager
Message 2 of 3

Re: Github actions working-directory incorrectly documented? 'Unexpected value 'working-directory''

Hey @yoroshikun,

 

I'm wondering if this is a syntax issue, could you try:

 

working-directory: ./gatsby

 

 

Thanks for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Ground Controller Lvl 1
Message 3 of 3

Re: Github actions working-directory incorrectly documented? 'Unexpected value 'working-directory''

I am getting the same error with the following file:

 

 

name: Continious Integration
on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Execute tests
      uses: agemooij/github-actions-sbt@master
      with:
        args: test
      working-directory: ./kafka-fs2