mage-os / github-actions

Mage-OS GitHub Actions for the distribution repositories.
13 stars 12 forks source link

[RFC] Removal of publicly-facing workflows #140

Open damienwebdev opened 1 year ago

damienwebdev commented 1 year ago

:bulb: Feature request

Feature Name

No public workflows.

The Desired Behavior

I would like for there to be no workflows available in the public API of this repo.

Your Use Case

Previously, we exposed an integration workflow that others could use to run integration tests.

This is rather brittle and is too inflexible for more complex use-cases like #14 or supporting Opensearch or any search driver/database service/caching service, etc.

The reason we had workflows in the first place was so that I could encapsulate the services logic that the workflows use. It turns out that we don't need to do this at all.

Instead, I would like to expose an action with a usage interface like:

jobs:
    compute_env:
      runs-on: ubuntu-latest
      outputs:
        matrix: ${{ steps.supported-services.outputs.services }}
      steps:
        - uses: actions/checkout@v3

        - uses: mage-os/github-actions/supported-version@main
           id: supported-version

        - uses: mage-os/github-actions/supported-services@main
           id: supported-services
           with:
               configurations: '?'

    test
        needs: [compute_matrix]
        services: ${{ fromJson(needs.compute_env.outputs.services ) }}
        steps:
           - run: echo "Run tests..."
             shell: bash

I would like some feedback on what the API of such an action could be.

My current struggle is to find an input that allows controlled flexibility.

configuration - minimal, common, full, commerce-cloud, custom

Prior Work

14

139

ihor-sviziev commented 1 year ago

@damienwebdev, it is a great idea to do the github action to generate a list of services!

I think the supported-services should depend on the supported-version action, get it as an input, and return only a list of known services (e.g., MySQL, RabbitMQ, ElasticSearch).

One thing I think is missing in the supported-version action - is the version of OpenSearch that is compatible with the Magento / Mage-OS version. It can be added as an optional parameter to keep backward compatibility.

I would expect to have a parameter like:

For the configurations: 'custom' I suggest adding parameters like:

For the configurations: 'commerce-cloud' - I can't comment since I never worked with it.

Do you think it makes sense?