posit-dev / posit-dev/vip

[Feature] Collapse the duplicated workflow bash into composite actions

Open
#643 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
8
Forks
1
Avg merge
18h 23m
Merged PRs (30d)
63

Description

Several large bash blocks are copy-pasted across the workflow files, which means a fix to one has to be remembered in five other places.

The "check for license errors" block, roughly 20 to 25 lines that finds the container, greps its log for expired or invalid license text and writes a step summary, appears in workbench-smoke.yml, connect-smoke.yml, packagemanager-smoke.yml, connect-integration.yml, example-report.yml and preview.yml. Only the product name, container filter and secret name differ, so this is close to pure string substitution.

The workflow-summary block that parses the JUnit XML and builds the emoji results table, roughly 35 to 45 lines, appears in connect-smoke.yml, packagemanager-smoke.yml, workbench-smoke.yml, connect-integration.yml and example-report.yml. This is the single largest duplicated block.

Three smaller ones: the set-matrix job is effectively identical between connect-smoke.yml and workbench-smoke.yml and the same shape in packagemanager-smoke.yml and mock-idp-e2e.yml; the "update job title with resolved version" github-script step is repeated in three smoke workflows with only the matrix field name differing; and the four-part status aggregator job is repeated in four workflows, though that one embeds product-specific wording and is more entangled.

A handful of composite actions under .github/actions/ would collapse most of this. There is now a local composite action in the tree to follow as a pattern. Worth doing incrementally, highest-duplication block first, rather than as one large change.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing local composite action under .github/actions/ and compare the license-check block across workbench-smoke.yml, connect-smoke.yml, packagemanager-smoke.yml, connect-integration.yml, example-report.yml and preview.yml. Extract the highest-duplication block first, then verify the affected workflows retain their product-specific inputs, license checks and step summaries. Continue incrementally with the workflow-summary block once the first action is working.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.