Skip to content

osinfra-io/github-misc-called-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Open Source Infrastructure as Code Service Account
Nov 19, 2023
d18fe01 · Nov 19, 2023

History

22 Commits
Jun 27, 2023
Mar 28, 2023
Nov 12, 2022
Jan 28, 2023
Nov 19, 2023

Repository files navigation

Miscellaneous Called Workflows

Reusing workflows avoids duplication. This makes workflows easier to maintain and allows you to create new workflows more quickly by building on the work of others, just as you do with actions.

Workflow reuse also promotes best practice by helping you to use workflows that are well designed, have already been tested, and have been proved to be effective. Your organization can build up a library of reusable workflows that can be centrally maintained.

Reusing Workflows

Rather than copying and pasting from one workflow to another, you can make workflows reusable. You and anyone with access to the reusable workflow can then call the reusable workflow from another workflow.

Workflows

Example Add to Project Usage

name: Add To GitHub Projects

on:
  issues:
    types:
      - opened
  pull_request:
    types:
      - opened

jobs:
  add-to-osinfra-project:
    name: Open Source Infrastructure (as Code)
    uses: osinfra-io/github-misc-called-workflows/.github/workflows/add-to-project.yml@v0.0.0
    with:
     project_id: 1
    secrets:
     add_to_project_pat: ${{ secrets.ADD_TO_PROJECT_PAT }}

Example Dependabot Usage

name: Dependabot

on: pull_request_target

jobs:
  dependabot:
    name: Dependabot
    uses: osinfra-io/github-misc-called-workflows/.github/workflows/dependabot.yml@v0.0.0
    secrets:
      pr_approve_and_merge_pat: ${{ secrets.PR_APPROVE_AND_MERGE_PAT }}