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

Reusing workflows avoids duplication #29

Open
jongwooo opened this issue Jul 13, 2023 · 0 comments
Open

Reusing workflows avoids duplication #29

jongwooo opened this issue Jul 13, 2023 · 0 comments

Comments

@jongwooo
Copy link

jongwooo commented Jul 13, 2023

Is your request related to a new offering from AWS?

N/A

Is your request related to a problem? Please describe.

Each repository has five workflow codes(e.g. lock.yml, pr-title.yml, etc.). These workflows consist of the same code. If the workflow requirements change, the workflow for each repository must be changed individually. This makes maintenance difficult and can lead to human error.

Describe the solution you'd like.

By abstracting into reusable workflows, we can simplify redundant workflows.

Example

Example code

terraform-aws-modules/.github/.github/workflow-templates/lock.yml:

name: 'Lock Threads Template'

on: workflow_call

jobs:
  lock:
    runs-on: ubuntu-latest
    steps:
    # ...

terraform-aws-modules/terraform-aws-vpc/.github/workflows/lock.yml:

name: 'Call Lock Threads'

on:
  schedule:
    - cron: '50 1 * * *'

jobs:
  call-lock:
    uses: terraform-aws-modules/.github/.github/workflow-templates/lock.yml
    with:
      secrets: inheirt

References

Describe alternatives you've considered.

N/A

Additional context

If there's nothing wrong with this issue, can I work on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant