Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action does not respect github default working directory #120

Open
Mistobaan opened this issue Aug 31, 2021 · 4 comments
Open

Action does not respect github default working directory #120

Mistobaan opened this issue Aug 31, 2021 · 4 comments

Comments

@Mistobaan
Copy link

Action does not respect github default working directory

image

Previous issues that had to deal with this subtle error:
#68 (comment)

@paragbhingre
Copy link
Contributor

@Mistobaan Thank you for raising this issue with us, we will get back to you once we have answer to this issue.

@pdehlke
Copy link

pdehlke commented May 1, 2022

Any word on this?

@dibyadhar
Copy link

Any update on this ?

@michaeloyer
Copy link

michaeloyer commented Dec 7, 2023

Ran into this issue today as well and unfortunately it does not appear this will be something that gets changed.

Right now you either give it an absolute path OR it puts it in the directory attached to the GITHUB_WORKSPACE environment variable.

In case workarounds will help someone in the future you can either:

  1. Write to the environment variable which is at the root of your checked out files (what I'm doing):
- name: Download task definition
  run: |
    aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} --query taskDefinition \
      > ${{ github.workspace }}/task-definition.json

- name: Fill in the new image ID in the Amazon ECS task definition
  id: task-def
  uses: aws-actions/amazon-ecs-render-task-definition@v1
  with:
    task-definition: task-definition.json
    container-name: ...
    image: ...
  1. Write to the temp directory /tmp/task-definition.json (YMMV with what OS you are using)
- name: Download task definition
  run: |
    aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} --query taskDefinition \
      > /tmp/task-definition.json

- name: Fill in the new image ID in the Amazon ECS task definition
  id: task-def
  uses: aws-actions/amazon-ecs-render-task-definition@v1
  with:
    task-definition: /tmp/task-definition.json
    container-name: ...
    image: ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants