Skip to content

Divide and abstract complex workflows #1

@jongwooo

Description

@jongwooo

proposal: Divide and abstract complex workflows

Important

Do not link a pull request to this issue(e.g. Closes #1).

Currently, as we look at the repository in our org, each workflow is written in a messy way.
For example, the check-commit-message workflow is a duplicate of the same code for each repository.

check-commit-message:
  name: Check Commit Message
  runs-on: ubuntu-latest
  steps:
    - name: Get PR Commits
      id: 'get-pr-commits'
      uses: tim-actions/get-pr-commits@master
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
    - name: Check Subject Line Length
      uses: tim-actions/commit-message-checker-with-regex@v0.3.1
      with:
        commits: ${{ steps.get-pr-commits.outputs.commits }}
        pattern: '^.{0,50}(\n.*)*$'
        error: 'Subject too long (max 50)'
    - name: Check Body Line Length
      if: ${{ success() || failure() }}
      uses: tim-actions/commit-message-checker-with-regex@v0.3.1
      with:
        commits: ${{ steps.get-pr-commits.outputs.commits }}
        pattern: '^.+(\n.{0,72})*$'
        error: 'Body line too long (max 72)'

Duplicate workflows make maintenance difficult and increase the potential for human error.

Rather than using workflow files for each trigger event, we should separate them by functionality and see what we can abstract away along the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreChange build process or tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions