Skip to content
Latchkey

Version Bump workflow (Unstructured-IO/unstructured-api)

The Version Bump workflow from Unstructured-IO/unstructured-api, explained and optimized by Latchkey.

C

CI health: C - fair

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: Unstructured-IO/unstructured-api.github/workflows/version-bump.ymlLicense Apache-2.0View source

What it does

This is the Version Bump workflow from the Unstructured-IO/unstructured-api repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Version Bump

on:
  pull_request:
    branches: [main]
    types: [opened, synchronize, reopened]

permissions:
  contents: write
  pull-requests: read

jobs:
  version-bump:
    if: github.event.pull_request.user.login == 'utic-renovate[bot]'
    uses: Unstructured-IO/infra/.github/workflows/version-bump.yml@main
    with:
      component-paths: '["."]'
      default-bump: patch
      update-changelog: true
      update-lockfile: true
      renovate-app-id: ${{ vars.RENOVATE_APP_ID }}
    secrets:
      token: ${{ secrets.GITHUB_TOKEN }}
      private-pypi-url: ${{ secrets.PRIVATE_PYPI_INDEX_URL }}
      renovate-app-private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }}

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Version Bump
 
on:
  pull_request:
    branches: [main]
    types: [opened, synchronize, reopened]
 
permissions:
  contents: write
  pull-requests: read
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  version-bump:
    timeout-minutes: 30
    if: github.event.pull_request.user.login == 'utic-renovate[bot]'
    uses: Unstructured-IO/infra/.github/workflows/version-bump.yml@main
    with:
      component-paths: '["."]'
      default-bump: patch
      update-changelog: true
      update-lockfile: true
      renovate-app-id: ${{ vars.RENOVATE_APP_ID }}
    secrets:
      token: ${{ secrets.GITHUB_TOKEN }}
      private-pypi-url: ${{ secrets.PRIVATE_PYPI_INDEX_URL }}
      renovate-app-private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }}
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.