Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Conversation

@TannerGilbert
Copy link
Member

@TannerGilbert TannerGilbert commented Mar 23, 2022

Currently the ah_lint_pr action fails at the copy_files step with the following error message:

Run # Copy artifacthub-pkg.yml and parent folder into new folder
  # Copy artifacthub-pkg.yml and parent folder into new folder
  mkdir changed_services && cp -pv --parents folder/1.0.0/artifacthub-pkg.yml changed_services
  shell: /usr/bin/bash -e {0}
cp: failed to get attributes of 'folder': No such file or directory
Error: Process completed with exit code 1.

After doing some debugging it turns out that this only happens for pull_request_target and works fine with pull_request.

image

When using pull_request_target the new service isn't fetched by actions/checkout@v2 even though the get-changed-files action seems to fetch the data without a problem.

image

This seems to be a problem with the actions/checkout@v2 when working with pull_request_target. To fix this a ref needed to be added as described in actions/checkout#518 (comment).

image

Signed-off-by: TannerGilbert <gilberttanner.work@gmail.com>
Copy link
Member

@Raffy23 Raffy23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@christian-kreuzberger-dtx christian-kreuzberger-dtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TannerGilbert TannerGilbert merged commit 58e8e6b into main Mar 23, 2022
@TannerGilbert TannerGilbert deleted the fix/ah-pr-linter-pr-target-bug branch March 23, 2022 13:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants