Skip to content

Commit

Permalink
filter empties
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi committed May 30, 2024
1 parent f707a78 commit e03fe7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/argus-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
return regexPattern.test(text);
}
const branches = `${{ inputs.branches }}`.split(',').map(b => b.trim());
const branchesIgnore = `${{ inputs.branches_ignore }}`.split(',').map(b => b.trim());
const branches = `${{ inputs.branches }}`.split(',').map(b => b.trim()).filter(b => b.length > 0);
const branchesIgnore = `${{ inputs.branches_ignore }}`.split(',').map(b => b.trim()).filter(b => b.length > 0);
const branch = `${{ github.ref }}`.replace('refs/heads/', '');
const shouldRun = branches.some(b => wildcardMatch(branch, b)) && !branchesIgnore.some(b => wildcardMatch(branch, b));
Expand All @@ -78,14 +78,14 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const filters = `${{ inputs.path_filters }}`.split(',').map(f => f.trim());
const filters = `${{ inputs.path_filters }}`.split(',').map(f => f.trim()).filter(b => b.length > 0);
const filtersStr = "run_on:\n" + filters.map(f => ` - '${f}'`).join('\n');
core.setOutput('filters', filtersStr);
const images = JSON.parse(`${{ inputs.images }}`);
core.setOutput('images', images);
const envs = `${{ inputs.envs }}`.split(',').map(env => env.trim());
const envs = `${{ inputs.envs }}`.split(',').map(env => env.trim()).filter(b => b.length > 0);
core.setOutput('envs', envs.join(' '));
- name: Check for matching file changes
Expand Down

0 comments on commit e03fe7e

Please sign in to comment.