15 Commits
dev ... main

Author SHA1 Message Date
Zephrynis
07e5f4fb63 Add license 2025-12-29 22:18:12 +00:00
Emma
d8008cd155 feat: add blueprint-managed readme 2025-12-29 23:13:23 +01:00
Zephrynis
c15f98aac3 Update README.md 2025-04-15 22:09:59 +01:00
Zephrynis
deeb91c4f4 Update README.md 2025-04-15 22:06:40 +01:00
Zephrynis
241f9ee58d Update action.yml 2025-04-15 22:03:48 +01:00
52582315eb Fix: Incorrect output var name 2025-04-15 21:57:50 +01:00
be9389f59b Update entrypoint.sh 2025-04-15 21:50:21 +01:00
1487bb6b5b debug 2025-04-15 21:45:54 +01:00
769b79a83a Fix: remove dev mode check from export script, change from build command to export 2025-04-15 21:41:35 +01:00
891f7437c2 Fix: Change relative ptero dir to absolute dir 2025-04-15 21:02:40 +01:00
04352cba3f Fix: base dir being made before alt loc is specified 2025-04-15 20:51:00 +01:00
6affb23a92 Fix: move commands to entrypoint 2025-04-15 20:31:44 +01:00
b602a2c22c debugging 2025-04-15 20:26:17 +01:00
1e5c8fd21c Fix: make gh workspace copy dir relative 2025-04-15 20:23:19 +01:00
Zephrynis
6b57cb2f45 Merge pull request #1 from zephrynis/dev
Create Dockerfile and action.yml
2025-04-15 20:05:11 +01:00
5 changed files with 72 additions and 14 deletions

View File

@@ -1,11 +1,6 @@
FROM ghcr.io/blueprintframework/blueprint:v1.11.10
ENV BASE_DIR=/srv/pterodactyl
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY ./github/workspace/. /srv/pterodactyl/.blueprint/dev/
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
ENTRYPOINT ["/entrypoint.sh"]

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Zephrynis & Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,2 +1,21 @@
# blueprint-build
GH Action to build a blueprint addon
<!-- START BLUEPRINT-MANAGED README -->
> [!IMPORTANT]
> This project is an unofficial project hosted on the [`blueprint-community`](https://github.com/blueprint-community) GitHub organization.
> [Blueprint](https://blueprint.zip) does not create, endorse or maintain these projects.
>
> You are free to contribute, fork and reuse sections of this codebase [in accordance with this projects' license](LICENSE).
<br>
<h2 align="center"> Blueprint Export Action </h2>
<p align="center"> This GitHub Action can be used to export the source code of a blueprint addon to a .blueprint file </p>
<br>
<!-- END BLUEPRINT-MANAGED README -->
## How to Use
The action has one output, FILE. This can be used in a workflow with the following variable: `${{ steps.blueprint_build.outputs.FILE }}`
An example of this in use can be found [here](https://github.com/zephrynis/ptero-sidebar/blob/main/.github/workflows/export_ext.yml).

View File

@@ -1,8 +1,8 @@
name: 'Blueprint Build'
description: 'Builds a blueprint addon'
name: 'Blueprint Export'
description: 'Exports a blueprint addon'
outputs:
file:
description: 'The path to the built addon file'
description: 'The path to the exported addon file'
runs:
using: 'docker'
image: 'Dockerfile'

23
entrypoint.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e
echo "Copying repo files into container"
cp -R /github/workspace/. /app/.blueprint/dev/
echo "Patching export script"
sed -i '4d' /app/scripts/commands/developer/export.sh
cd /app/.blueprint/dev
ls
cd /app/
echo "Running blueprint export"
blueprint -export
identifier=$(grep -m 1 "identifier:" /app/.blueprint/dev/conf.yml | cut -d ":" -f2 | xargs)
echo "Copying output back to workspace"
cp "/app/${identifier}.blueprint" "/github/workspace/${identifier}.blueprint"
echo "file=${identifier}.blueprint" >> $GITHUB_OUTPUT