dagger / dagger-for-github

GitHub Action for Dagger

Home Page:https://github.com/marketplace/actions/dagger-for-github

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐞 default working directory is not honored

noah-troncoso opened this issue Β· comments

What is the issue?

This action is not using the working directory when it is present.

Dagger version

dagger 0.10.2

Steps to reproduce

Create a workflow that uses a default directory:

name: Unit Tests

on:
  workflow_call:

jobs:
  test:
    defaults:
      run:
       # WORKING DIRECTORY HERE
        working-directory: dev/dagger
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout Project
        uses: actions/checkout@v3

      - name: Setup Node
        uses: actions/setup-node@v3

      - name: Install Dependencies
        run: npm install

      - name: Run Tests
        uses: dagger/dagger-for-github@v5
        with:
          version: '0.10.2'
          verb: run
          args: node --loader ts-node/esm src/unit-tests.mts

In order to work around this issue, you must re-specify the working directory:

...
      - name: Run Tests
        uses: dagger/dagger-for-github@v5
        with:
        # DUPLICATE CONFIG
         workDir: dev/dagger
          version: '0.10.2'
          verb: run
          args: node --loader ts-node/esm src/unit-tests.mts

Log output

No response