Cli-microsoft365: Rename Office 365 CLI GitHub actions

Created on 8 Jul 2020  路  17Comments  路  Source: pnp/cli-microsoft365

Following the rename of Office 365 CLI to CLI for Microsoft 365, we should rename the GitHub actions for CLI.

  • [ ] login
  • [ ] deploy
  • [ ] runscript
work in progress

Most helpful comment

Looking into this further, we can change the name and description of the action in the metadata, which is pushed to the marketplace on publish, found this in the repo settings.

The docs refer to name in the metadata only and not the name of the workflow action which comes from a combination of the repo name and the tag versions.

I've raised a PR with changes required for the Login action, once merged we can then perform a v2.0.0 release which should push the updated name and description to the marketplace and publish pnp/[email protected].

All 17 comments

I'll pick this up.

Rather than rename the Actions, I think that we should create new actions under the new name, utilising the new package, @pnp/cli-microsoft365 and leave the Office 365 CLI actions in place.

The reason for this is that it doesn't appear that we can rename actions once they have been published to the marketplace, so the only option would be to remove the action and re-create it, as we don't know what the usage is of the actions are (GH doesn't provide metrics) we could break things for people.

I propose we leave Office 365 CLI actions in place, but update the docs to state that it is deprecated and point them to the new CLI for Microsoft 365 Actions as an upgrade path.

Whilst we do this, we should also promote this change for awareness and maybe put in a timeline to remove the Office 365 CLI actions completely.

@pnp/cli-for-microsoft-365-maintainers thoughts?

Good idea! Let's do that!

Before we proceed, just to double check: is it not possible to change the display name of the action or the actual name referenced in the workflow (ie. @pnp/action-cli-login)? If it's the latter, then we could simply release a v2 because there is no mention of O365 anywhere in it. If it's the display name that can't be changed in the marketplace then it would be indeed clearer to have a new set

Actions are published to GitHub Marketplace immediately and aren't reviewed by GitHub as long as they meet these requirements:

  • The action must be in a public repository.
  • Each repository must contain a single action.
  • The action's metadata file (action.yml or action.yaml) must be in the root directory of the repository.
  • The name in the action's metadata file must be unique.
  • The name cannot match an existing action name published on GitHub Marketplace.
  • The name cannot match a user or organization on GitHub, unless the user or organization owner is publishing the action. For example, only the GitHub organization can publish an action named github.
  • The name cannot match an existing GitHub Marketplace category.
  • GitHub reserves the names of GitHub features.

Source: https://docs.github.com/en/actions/creating-actions/publishing-actions-in-github-marketplace#about-publishing-actions

Unfortunately, the name property in the action.yml files contains Office 365 CLI

name: 'Office 365 CLI Login'
description: 'Login to tenant using Office 365 CLI'

This is what is used in the marketplace

image

Whilst we could change the internals to use @pnp/cli-microsoft365 and push out an updated version like you have suggested, we would not be able to update the name in the marketplace without publishing a new action from a new repo.

Good find! I guess that settles it then. Let's release a new set of actions tied to v3 using the new name.

Should we create the new repos with a more consistent name?

pnp/cli-microsoft365-action-login

I will update the existing action readme with a deprecation message and point to the new actions when we have the new actions on the marketplace.

cc/ @andrewconnell for awareness that the new version will mean a change in the action name.

Just to clarify, below is an approach for updating the login action.

  • Create new repo pnp/cli-microsoft-365-action-login
  • Push current master branch from pnp/cli-action-login to pnp/cli-microsoft-365-action-login, so this keeps the commit history
  • Raise PR to update master branch on pnp/cli-microsoft-365-action-login updating all references of Office 365 CLI to CLI for Microsoft 365 and update the package name from @pnp/office365-cli to @pnp/cli-microsoft365
  • Configure action publishing settings in pnp/cli-microsoft-365-action-login
  • Add tag for 3.0.0 to master branch in pnp/cli-microsoft-365-action-login to publish action to marketplace
  • Raise PR to add deprecation message to pnp/cli-action-login readme

@waldekmastykarz happy with the above? This would mean that when published, folks using the new actions in a GH workflow, they would use @pnp/[email protected]

Why use v3 for the action? In the actions we have published currently we used v1 for actions using CLI v2. Haven't we agreed to version actions independently of the CLI?

I was thinking along the lines of matching the current major version of the CLI, but you are correct in that it was agreed to version the actions independently.

Happy to move to 2.0.0, although now I think about it more there is nothing stopping us from using 1.0.0 as I can remove the existing tag and recreate it before publishing to the marketplace.

Do we want to start a new action from v2.0.0? Might be confusing for people who don't know the history.

Let's start with v1. That way, in case there are breaking changes in the action, we can communicate them accordingly. Even though we might update to a newer version of the CLI in the future, as long as the changes aren't affecting actions, actions' users would not need to be concerned.

Looking into this further, we can change the name and description of the action in the metadata, which is pushed to the marketplace on publish, found this in the repo settings.

The docs refer to name in the metadata only and not the name of the workflow action which comes from a combination of the repo name and the tag versions.

I've raised a PR with changes required for the Login action, once merged we can then perform a v2.0.0 release which should push the updated name and description to the marketplace and publish pnp/[email protected].

Nice! 馃憦

All three actions have now been renamed. all use the new package, @pnp/cli-microsoft365 and have been published to the marketplace.

https://github.com/marketplace/actions/cli-for-microsoft-365-login
https://github.com/marketplace/actions/cli-for-microsoft-365-deploy
https://github.com/marketplace/actions/cli-for-microsoft-365-run-script

So... that means with the rename, there should be no impact on existing uses, correct? Because it's not an action rename, it's just a _packaging or marketing_ rename in reality... right?

Yep, exactly that, all existing workflows will still function as they do now.

Was this page helpful?
0 / 5 - 0 ratings