docker-maven/github-action-generation.sh
2023-02-14 14:29:47 +01:00

16 lines
503 B
Bash
Executable file

#!/usr/bin/env bash
set -eu
# Generate one github action for each docker image
. common.sh
for version in "${all_dirs[@]}"; do
echo "Generating action for $version"
if [[ "$version" == *"windows"* ]] || [[ "$version" == *"nanoserver"* ]]; then
sed -e "s/DIRECTORY/$version/" .github/github-action-windows-template.yaml >".github/workflows/$version.yml"
else
sed -e "s/DIRECTORY/$version/" .github/github-action-template.yaml >".github/workflows/$version.yml"
fi
done