beanc16 / roll-of-darkness-bot

A discord bot for rolling dice in the New World of Darkness, Pokemon Tabletop United, and Curseborne tabletop systems
1 stars 0 forks source link

`registerSlashCommand.yml` does not notify discord on failure or cancel as intended #6

Open beanc16 opened 1 day ago

beanc16 commented 1 day ago

Context

The registerSlashCommand.yml GitHub Action (GHA) runs whenever code is pushed to main https://github.com/beanc16/roll-of-darkness-bot/blob/faf5e80cad4529e956c08b746cb3dbba9ad6fe5b/.github/workflows/registerSlashCommands.yml#L1-L8

This GHA is expected to notify discord once npm run register-slash-commands is run prior in the GHA when it succeeds, fails, or if the GHA is canceled. https://github.com/beanc16/roll-of-darkness-bot/blob/faf5e80cad4529e956c08b746cb3dbba9ad6fe5b/.github/workflows/registerSlashCommands.yml#L45-L75

Repro Steps

  1. Create a temporary branch for testing in which register-slash-commands is set up to intentionally fail when run.
  2. Temporarily allow registerSlashCommand.yml to be triggered manually in GitHub on the test branch for testing purposes. (Ensure that this change does not get committed permanently - we want it to only be triggered automatically once this bug is fixed.)
  3. Run the GitHub Action manually in the GitHub UI on the test branch.

Expected Result

The GitHub Action notifies discord of failures and cancels.

Actual Result

The GitHub Action only notifies discord when the script succeeds.