CycodeLabs / CycodeLabs/raven

take care for action references that are submodules

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
downloader good first issue Low Priority
Dominant language
Python
Stars
747
Forks
45
PR merge metrics
No merged PRs in 30d

Description

When we try to resolve the actions, and when there are relative paths, we try to resolve these paths into absolute paths and download the referenced action.

Sometimes the resolved absolute path is referencing a submodule. We aren't aware of that, and try to download the file which means nothing.

A real-world example:
This is part of [ci.yml](https://github.com/apache/airflow/blob/main/.github/workflows/ci.yml) file for [apache/airflow](https://github.com/apache/airflow) repository:
```
- name: Configure AWS credentials
uses: ./.github/actions/configure-aws-credentials
if: >
github.ref == 'refs/heads/main' && github.repository == 'apache/airflow' &&
github.event_name == 'push'
```

the `configure-aws-credentials` is actually a submodule, so we are unable to find the `action.yml` file beneath it (even though he exists in the submodule)

This is how raven logs looks like:

```
[+] Found 6 workflows for apache/airflow
[+] Fetching build-images.yml
[+] Fetching ci.yml
[-] Couldn't download the action.yml for the dependent action referenced by './.github/actions/configure-aws-credentials' (Maybe runs a local action that was checked out previously? Maybe the action is executed through a Dockerfile?)
[-] Couldn't download the action.yml for the dependent action referenced by './.github/actions/github-push-action' (Maybe runs a local action that was checked out previously? Maybe the action is executed through a Dockerfile?)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.