Skip to content

Commit

Permalink
Update builder.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
UplandJacob authored Nov 14, 2024
1 parent 98f71db commit 2423f93
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,25 @@ jobs:
- name: Check if add-on should be built
id: check
run: |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "build_arch=true" >> $GITHUB_OUTPUT;
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT;
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUILD_ARGS=" >> $GITHUB_ENV;
fi
else
echo "${{ matrix.arch }} is not in build.yaml for ${{ matrix.addon }}, skipping build";
echo "build_arch=false" >> $GITHUB_OUTPUT;
build_archs=${{ steps.info.outputs.architectures }}
config_archs=$(yq eval -o=json '.arch' ./${{ matrix.addon }}/config.yaml | jq -c '.')
echo "From build.yaml: $build_archs"
echo "From config.yaml: $config_archs"
if [[ "${build_archs}" =~ ${{ matrix.arch }} ]]; then
if [[ "${config_archs}" =~ ${{ matrix.arch }} ]]; then
echo "build_arch=true" >> $GITHUB_OUTPUT;
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT;
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUILD_ARGS=" >> $GITHUB_ENV;
fi
else
echo "${{ matrix.arch }} is not in condig.yaml for ${{ matrix.addon }}, skipping build";
echo "build_arch=false" >> $GITHUB_OUTPUT;
fi
else
echo "${{ matrix.arch }} is not in build.yaml for ${{ matrix.addon }}, skipping build";
echo "build_arch=false" >> $GITHUB_OUTPUT;
fi
# - name: Login to GitHub Container Registry
Expand Down

0 comments on commit 2423f93

Please sign in to comment.