Skip to content

working-directory not respected #355

Description

@jameswinegar
jobs:
  build:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./subapp
        
      - name: Download task definition
        run: |
          aws ecs describe-task-definition --task-definition subapp --query taskDefinition > taskdefinition.json
          
      - name: new image in ECS taskdefinition
        id: task-def
        uses: aws-actions/amazon-ecs-render-task-definition@v1
        with:
          task-definition: taskdefinition.json
          container-name: subapp-container
          image: ${{ steps.login-ecr.outputs.registry }}/subapp:${{ github.sha }}          

Fails with file not found error, because it was written at the working directory. Workaround was to provide the path by using pwd.

      - name: Print current directory
        id: pwd
        run: echo "::set-output name=path::$(pwd)"

      - name: new image in ECS taskdefinition
        id: task-def
        uses: aws-actions/amazon-ecs-render-task-definition@v1
        with:
          task-definition: ${{ steps.pwd.outputs.path }}/taskdefinition.json
          container-name: subapp-container
          image: ${{ steps.login-ecr.outputs.registry }}/subapp:${{ github.sha }}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions