How do I create a custom action? I want to create simple actions that will change the field_support_status field value to 1 or 0. I enabled the "Actions" module and created a custom module with my actions, but after the module is installed the actions do not appear.

In my module, I created files with the following structure:

/src/Plugins/Action/SupportStatusYes.php

&lt;?php
namespace Drupal\support_action\Plugin\Action;
use Drupal\Core\Action\ActionBase;
use Drupal\Core\Session\AccountInterface;
/**
 * Change support status on yes.
 *
 * @Action(
 *   id = "support_status_yes",
 *   label = @Translation("Change support status on yes"),
 *   type = "node"
 * )
 */
class SupportStatusYes extends ActionBase {

  /**
   * {@inheritdoc}
   */
  public function execute($entity = NULL) {
    /** @var \Drupal\node\NodeInterface $node */
    if ($entity-&gt;hasField('field_support_status')) {
      $entity-&gt;field_support_status-&gt;value = 1;
      $entity-&gt;save();
    }

  }

  /**
   * {@inheritdoc}
   */
  public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    /** @var \Drupal\node\NodeInterface $object */
    $result = $object-&gt;access('update', $account, TRUE)
      -&gt;andIf($object-&gt;field_support_status-&gt;access('edit', $account, TRUE));

    return $return_as_object ? $result : $result-&gt;isAllowed();
  }

}


/src/Plugins/Action/SupportStatusNo.php

&lt;?php
namespace Drupal\support_action\Plugin\Action;
use Drupal\Core\Action\ActionBase;
use Drupal\Core\Session\AccountInterface;
/**
 * Change support status on no.
 *
 * @Action(
 *   id = "support_status_no",
 *   label = @Translation("Change support status on no"),
 *   type = "node"
 * )
 */
class SupportStatusNo extends ActionBase {

  /**
   * {@inheritdoc}
   */
  public function execute($entity = NULL) {
    /** @var \Drupal\node\NodeInterface $node */
    if ($entity-&gt;hasField('field_support_status')) {
      $entity-&gt;field_support_status-&gt;value = 0;
      $entity-&gt;save();
    }

  }

  /**
   * {@inheritdoc}
   */
  public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    /** @var \Drupal\node\NodeInterface $object */
    $result = $object-&gt;access('update', $account, TRUE)
      -&gt;andIf($object-&gt;field_support_status-&gt;access('edit', $account, TRUE));

    return $return_as_object ? $result : $result-&gt;isAllowed();
  }

}


/config/install/system.action.support_status_no.yml

langcode: en
status: true
dependencies:
  module:
    - node
id: support_status_no
label: 'Change support status on no'
type: node
plugin: support_status_no
configuration: {  }


/config/install/system.action.support_status_yes.yml

langcode: en
status: true
dependencies:
  module:
    - node
id: support_status_yes
label: 'Change support status on yes'
type: node
plugin: support_status_yes
configuration: {  }


/config/schema/support_action.schema.yml

action.configuration.support_status_yes:
  type: action_configuration_default
  label: 'Change support status on yes'

action.configuration.support_status_no:
  type: action_configuration_default
  label: 'Change support status on no'


Tell me please what am I doing wrong?
The correct directory structure is src/Plugin, not src/Plugins.

The files in config/schema/ and config/install/ look correct to me. I struggled with those mightily. And I'll emphasize that actions only seem to be registered when the module is installed.