Skip to content

[com.github.actions] Auto update actions #144

@StefMa

Description

@StefMa

I thought a bit about auto-updating the actions within the com.github.actions package.
The solution is quite obvious:

  1. Create a github action workflow
  2. run it every [to be discussed]
  3. create a PR with the updated actions.

The second part is a bit tricky.
What exactly should we run?

There is the script/generate-github.sh which kind of already does the job.

But this has a problem.
If a latest version was found, but it is not part of the typesafegithub catalog, it just create the action without typing aka. fallsback to String|Number|Boolean (= not good enough for us 😅 ).
We have a workaround for this, by creating our the actionTypes ourselfs and place it into scripts/actionTypes/actions.
But

  1. This is in my opinion not a good solution because we end up with two sources. One the internal actionTypes/actions and typesafegithub.
  2. This needs manual efford, which is simply not doable on CI.

typesafegithub solves this a bit.
I found out that they fallback to the previous version if the current version was not found.
E.g.

  1. actions/checkout@v6 requested but not found
  2. actions/checkout@v5 typings returned

So what we can do:

  • Remove the pkl workaround
  • Rely 100% on the typesafegithub catalog
  • Fallback to the previous version if not yet typed

With this, the package will always have up-to-date actions.
Even if v[newRelease] is not 100% typed, most of it is.
Given that inputs and outputs changes very rarely.
However, we still have the inputs available with our fallback of String|Number|Boolean.

The next question would arrise:
How to update this action, as soon as it got typed?


Just random thoughts about this topic.
Would be great to get your opinions on that 🙂

Have a nice christmas in case you celebrate it 🎄
Otherwise just enjoy the time 🙂

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