rest-guide icon indicating copy to clipboard operation
rest-guide copied to clipboard

Update GitHub actions

Open pvdbosch opened this issue 1 year ago • 3 comments

In builds of rest-guide and the openapi-* projects, we have some deprecation warnings in the builds about

  • https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/ => will be problem in Spring 2024
  • https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

For rest-guide, I already updated two offending github actions to latest version (+ JDK 17):

    - uses: actions/checkout@v4
    - name: Set up Adopt OpenJDK 17
      uses: actions/setup-java@v4
      with:
        distribution: adopt
        java-version: '17'

The release actions (actions/create-release@v1 and actions/upload-release-asset@v1) have become unmaintained however, and should be replaced by alternatives.

Is there someone who wants to work on this?

pvdbosch avatar Jan 31 '24 09:01 pvdbosch

GitHub CLI comes preinstalled on all GitHub hosted runners. If that meets the requirements, that seems more future proof to me than searching for an alternative action that risks becoming unmaintained: https://cli.github.com/manual/gh_release_create

jpraet avatar Feb 21 '24 11:02 jpraet

Once the updated gh-actions release workflow of https://github.com/belgif/openapi-location/pull/9 has been validated, I will create PRs to apply the same changes to the other repos.

jpraet avatar Apr 15 '24 13:04 jpraet

We also have these workflow templates that I forgot about. It is also possible to define reusable workflows.

jpraet avatar Apr 19 '24 11:04 jpraet

@jpraet , I released belgif-openapi-location 1.2.0 with the new Github Actions without a problem. The artifacts still have to be indexed by Maven Central, but I verified staging.

pvdbosch avatar Jul 02 '24 10:07 pvdbosch

Do I copy the configuration over to the other belgif/openapi-* repos, or should I try a reusable workflow?

jpraet avatar Jul 02 '24 14:07 jpraet

Reusable workflow looks a bit easier to maintain in the long run; if it isn't too much work

pvdbosch avatar Jul 02 '24 15:07 pvdbosch

Reusable workflows created in this new workflows repo, and activated for all belgif/openapi-* repos.

jpraet avatar Jul 04 '24 10:07 jpraet