mirror of
https://github.com/blueprint-community/action-export.git
synced 2026-02-18 20:01:55 +00:00
Fix: move commands to entrypoint
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -2,12 +2,7 @@ FROM ghcr.io/blueprintframework/blueprint:v1.11.10
|
|||||||
|
|
||||||
ENV BASE_DIR=/srv/pterodactyl
|
ENV BASE_DIR=/srv/pterodactyl
|
||||||
|
|
||||||
RUN ls
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
COPY ./github/workspace/. /srv/pterodactyl/.blueprint/dev/
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
RUN blueprint -build
|
|
||||||
|
|
||||||
RUN identifier=$(cat /srv/pterodactyl/.blueprint/dev/conf.yml | grep -m 1 "identifier:" | cut -d ":" -f2 | xargs) && \
|
|
||||||
cp /srv/pterodactyl/${identifier}.blueprint /github/workspace/${identifier}.blueprint && \
|
|
||||||
echo "${identifier}.blueprint" >> $GITHUB_OUTPUT
|
|
||||||
16
entrypoint.sh
Normal file
16
entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Copying repo files into container"
|
||||||
|
cp -r /github/workspace/. /srv/pterodactyl/.blueprint/dev/
|
||||||
|
|
||||||
|
echo "Running blueprint build"
|
||||||
|
blueprint -build
|
||||||
|
|
||||||
|
identifier=$(grep -m 1 "identifier:" /srv/pterodactyl/.blueprint/dev/conf.yml | cut -d ":" -f2 | xargs)
|
||||||
|
|
||||||
|
echo "Copying output back to workspace"
|
||||||
|
cp "/srv/pterodactyl/${identifier}.blueprint" "/github/workspace/${identifier}.blueprint"
|
||||||
|
|
||||||
|
# Set output if needed
|
||||||
|
echo "blueprint_file=${identifier}.blueprint" >> $GITHUB_OUTPUT
|
||||||
Reference in New Issue
Block a user