Skip to content

Commit

Permalink
Add ability to build plugins with a top-level Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyLeite committed Jan 7, 2023
1 parent c51182d commit 9e0b9d2
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,28 @@ jobs:
unset $IFS
echo "${sorted[@]}"
echo edited_files=${sorted[@]} >> $GITHUB_OUTPUT
- name: Build plugins with top-level Dockerfiles
id: build-top-level
run: |
pushd plugins
TO_BUILD_PLUGINS=$(find . -maxdepth 2 -name "Dockerfile" -exec dirname {} \;)
for plugin in $TO_BUILD_PLUGINS; do
echo $plugin
# Pretend to sanitize the directory name. Should improve this later
sane_plugin_name=$(basename $plugin)
output=/tmp/output-top-level/$sane_plugin_name
# Build plugin's top-level Dockerfile
docker build -f $plugin/Dockerfile -t $sane_plugin_name $plugin
docker run --rm -v $output:/output $sane_plugin_name
# Replace current plugin directory with built one from Docker
rm -r $plugin
cp -r $output .
done
- name: Build plugin backends
run: |
IFS=' ' read -ra files <<< "${{ steps.list-files.outputs.edited_files }}"
Expand Down

0 comments on commit 9e0b9d2

Please sign in to comment.