GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
758 stars 220 forks source link

Switch to official GitHub action for managing app tokens #3164

Closed seisman closed 7 months ago

seisman commented 7 months ago

Currently, we're using the tibdex/github-app-token action to generate PAT tokens which are used in the /format slash command (initially proposed in https://github.com/GenericMappingTools/pygmt/pull/645#discussion_r502327175).

It seems that GitHub now provides an official action for this purpose (https://github.com/actions/create-github-app-token). I think we should try to switch to the official one. Looking at this PR (https://github.com/dependabot/dependabot-core/pull/9340), it seems we just need to update the action name and the action input names.

xref:

yvonnefroehlich commented 7 months ago

Meaning changing https://github.com/GenericMappingTools/pygmt/blob/16339753634de75b0b165bc8a1beead37d1c3ad2/.github/workflows/format-command.yml#L13-L18 to

      # Generate token from GenericMappingTools bot
      - uses: actions/create-github-app-token@v1.9
        id: generate-token
        with:
          app-id: ${{ secrets.APP_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}
seisman commented 7 months ago

Yes, that should work.

yvonnefroehlich commented 7 months ago

Yes, that should work.

Thank! I summited PR #3165 with this change.