Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divide and abstract complex workflows #1

Open
jongwooo opened this issue Aug 15, 2023 · 1 comment
Open

Divide and abstract complex workflows #1

jongwooo opened this issue Aug 15, 2023 · 1 comment
Labels
chore Change build process or tool

Comments

@jongwooo
Copy link
Collaborator

jongwooo commented Aug 15, 2023

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.

@jongwooo jongwooo added the chore Change build process or tool label Aug 15, 2023
@jongwooo jongwooo pinned this issue Aug 15, 2023
@Gseungmin
Copy link
Contributor

can I try this? I want to divide and abstract complex workflows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Change build process or tool
Projects
None yet
Development

No branches or pull requests

2 participants