take care for action references that are submodules

Offen
#39 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
git, github-actions, python
Bereich
devops, security

Rechercherichtung

Verwende das referenzierte ci.yml-Beispiel, um die Auflösung des relativen Action-Pfads nachzuverfolgen, und untersuche anschließend, wie action.yml heruntergeladen wird, wenn der Pfad in ein Git-Submodul zeigt. Erledigt ist die Aufgabe, wenn lokale Actions, die in Submodulen gehostet werden, erkannt werden und ihre action.yml-Dateien ohne den gemeldeten Download-Fehler aufgelöst werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

downloader good first issue Low Priority

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 file for 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?)
Vorherrschende Sprache
Python
Sterne
746
Forks
46
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CycodeLabs/raven

Alle Issues in CycodeLabs/raven

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.