simple-lead-time-action

🍀 Motivation

How long take time until release our commited code?

it's like lead-time in one of Four Keys

🍀 Definition of lead-time

  • you have "release" branch
  • you have "devlelop" branch
  • you merge "develop" => "release" branch by PR when we deploy to production as usual

🕙 Lead Time = PR merged date - PR first commited date


🍀 Example of result

image

this PR code spent "6 hours" until deliver to prodcution.

🍀 Save and Show history file to branch "simple-lead-time-action" as markdown file.

  • "simple-lead-time-action" branch create automatically when first trigger
  • adding new record when each trigger

image

  • you can disable this feature if don't need it. ENABLE_SAVE_HISTORY_FILE=false

🍀 You can get history file link from output value

image

🍀 Example action code

on:
  push:
    branches:
      - main

jobs:
  lead-time:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Find Lead Time
        id: lead-time
        uses: d-kanai/lead-time-action@v1.1.1
        env:
          PERSONAL_ACCESS_TOKEN_FOR_GITHUB_API: ${{secrets.PERSONAL_ACCESS_TOKEN_FOR_GITHUB_API}}
          REPOSITORY_NAME: ${{github.repository}}
          ENABLE_SAVE_HISTORY_FILE: true
          GITHUB_USER: d-kanai
          RELEASE_BRANCH_NAME: main

      - name: Show lead-time output
        run: echo "${{ steps.lead-time.outputs.lead-time }}"

      - name: Show history-link output
        run: echo "${{ steps.lead-time.outputs.history-link }}"

this action usualy trigger by "release" branch push.