mirror of
https://github.com/blueprint-community/action-export.git
synced 2026-02-19 04:11:53 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07e5f4fb63 | ||
|
|
d8008cd155 | ||
|
|
c15f98aac3 | ||
|
|
deeb91c4f4 | ||
|
|
241f9ee58d | ||
| 52582315eb | |||
| be9389f59b | |||
| 1487bb6b5b | |||
| 769b79a83a | |||
| 891f7437c2 | |||
| 04352cba3f | |||
| 6affb23a92 | |||
| b602a2c22c | |||
| 1e5c8fd21c | |||
|
|
6b57cb2f45 |
11
Dockerfile
11
Dockerfile
@@ -1,11 +1,6 @@
|
|||||||
FROM ghcr.io/blueprintframework/blueprint:v1.11.10
|
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/
|
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
|
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal 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.
|
||||||
23
README.md
23
README.md
@@ -1,2 +1,21 @@
|
|||||||
# blueprint-build
|
<!-- START BLUEPRINT-MANAGED README -->
|
||||||
GH Action to build a blueprint addon
|
|
||||||
|
> [!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).
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
name: 'Blueprint Build'
|
name: 'Blueprint Export'
|
||||||
description: 'Builds a blueprint addon'
|
description: 'Exports a blueprint addon'
|
||||||
outputs:
|
outputs:
|
||||||
file:
|
file:
|
||||||
description: 'The path to the built addon file'
|
description: 'The path to the exported addon file'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
|||||||
23
entrypoint.sh
Normal file
23
entrypoint.sh
Normal 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
|
||||||
Reference in New Issue
Block a user