devcontainers / devcontainers/ci

Use pattern matching in refFilterForPush

Open
#445 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
496
Forks
101
PR merge metrics
No merged PRs in 30d

Description

One popular branching strategy, when dealing with maintenance/patch releases, is to late-cut branches. That is, you end up with something like:
```
- main
- releases/v1
- releases/v1.4
- releases/v2
- etc
```
There may or may not be a floating major/minor release branch, depending on whether there are any bug fixes for any particular released version.

The problem is that currently `refFilterForPush` would require listing all such branches explicitly, meaning modifications to CI scripts for each release.

Instead, it would be nice if `refFilterForPush` supported pattern matching/globbing:
```yaml
- name: Pre-build dev container image
uses: devcontainers/ci@v0.3
timeout-minutes: 10
with:
imageName: someRepo/someImage
imageTag: sometag
subFolder: src
push: filter
refFilterForPush: |
refs/heads/main
refs/heads/releases/v*

```

Contributor guide

Open the contributing guide

Research direction

Start with the refFilterForPush entry point and the YAML example in the issue. Confirm how exact refs are currently selected, then define and verify matching for refs/heads/main and refs/heads/releases/v* so release branches do not need to be listed individually.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.