File tree Expand file tree Collapse file tree
.github/actions/discover-targets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Discover Targets"
2+ description : " Find valid GOOS targets for a distribution and FIPS configuration"
3+ inputs :
4+ distribution :
5+ description : " The distribution name"
6+ required : true
7+ fips :
8+ description : " Whether this is a FIPS build"
9+ required : true
10+ outputs :
11+ goos :
12+ description : " JSON array of valid GOOS values"
13+ value : ${{ steps.find.outputs.goos }}
14+ runs :
15+ using : " composite"
16+ steps :
17+ - name : Find Valid Build Targets
18+ id : find
19+ shell : bash
20+ run : |
21+ fips_suffix=$([[ "${{ inputs.fips }}" == "true" ]] && echo "-fips" || echo "")
22+ goreleaser_file="distributions/${{ inputs.distribution }}/.goreleaser${fips_suffix}.yaml"
23+
24+ goos=$(yq -r '.builds[].goos[]' "$goreleaser_file" | sort -u | jq -R -s -c 'split("\n")[:-1]')
25+
26+ echo "Found GOOS targets: $goos"
27+ echo "goos=$goos" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments