This commit is contained in:
parent
c83a77e925
commit
0abe0361ee
@ -1,4 +1,11 @@
|
|||||||
steps:
|
steps:
|
||||||
|
- name: Generate config file
|
||||||
|
image: bash
|
||||||
|
environment:
|
||||||
|
CONFIGJSON:
|
||||||
|
from_secret: config_json
|
||||||
|
commands:
|
||||||
|
- ./generate.sh
|
||||||
- name: build-container
|
- name: build-container
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
|
@ -3,7 +3,7 @@ WORKDIR /srv
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
RUN pip install .
|
RUN pip install .
|
||||||
RUN --mount=type=secret,id=config_json ./create_packs.sh
|
RUN ./create_packs.sh
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=0 /srv/web /usr/share/nginx/html
|
COPY --from=0 /srv/web /usr/share/nginx/html
|
||||||
|
@ -1,15 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "$PLUGIN_CONFIGJSON" >> config.json
|
if [ ! -f config.json ]; then
|
||||||
|
echo "no config found during sitcker generation"
|
||||||
if [ ! -s config.json ]; then
|
|
||||||
echo "no config found"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ -z $(grep '[^[:space:]]' "config.json") ]] ; then
|
|
||||||
echo "no config in file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for d in packs/*/ ; do
|
for d in packs/*/ ; do
|
||||||
sticker-pack "$d" --add-to-index web/packs/
|
sticker-pack "$d" --add-to-index web/packs/
|
||||||
done
|
done
|
||||||
|
rm config.json
|
||||||
|
15
generate.sh
Executable file
15
generate.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
touch config.json
|
||||||
|
cat >./config.json <<EOF
|
||||||
|
$CONFIGJSON
|
||||||
|
EOF
|
||||||
|
if [ ! -s config.json ]; then
|
||||||
|
echo "no config found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -z $(grep '[^[:space:]]' "config.json") ]] ; then
|
||||||
|
echo "no config in file"
|
||||||
|
rm config.json
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user