Detect Upstream Package Updates workflow (nickrunning/wechat-selkies)
The Detect Upstream Package Updates workflow from nickrunning/wechat-selkies, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Detect Upstream Package Updates workflow from the nickrunning/wechat-selkies repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Detect Upstream Package Updates
on:
workflow_dispatch:
schedule:
- cron: '23 */6 * * *'
permissions:
contents: write
jobs:
detect-wechat-updates:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect upstream package changes
id: detect
run: ./.github/scripts/detect-upstream.sh
- name: Commit updated version state
if: steps.detect.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add versions/upstream.env
git commit -m "chore: update upstream package state"
git push
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Detect Upstream Package Updates on: workflow_dispatch: schedule: - cron: '23 */6 * * *' permissions: contents: write jobs: detect-wechat-updates: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Detect upstream package changes id: detect run: ./.github/scripts/detect-upstream.sh - name: Commit updated version state if: steps.detect.outputs.changed == 'true' run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add versions/upstream.env git commit -m "chore: update upstream package state" git push
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.