mirror of
https://github.com/blueprint-community/action-export.git
synced 2026-02-19 12:11:55 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0dbfb9b03f |
11
Dockerfile
11
Dockerfile
@@ -1,6 +1,11 @@
|
|||||||
FROM ghcr.io/blueprintframework/blueprint:v1.11.10
|
FROM ghcr.io/blueprintframework/blueprint:v1.11.10
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
ENV BASE_DIR=/srv/pterodactyl
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT ["/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
|
||||||
21
LICENSE
21
LICENSE
@@ -1,21 +0,0 @@
|
|||||||
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,21 +1,2 @@
|
|||||||
<!-- START BLUEPRINT-MANAGED README -->
|
# blueprint-build
|
||||||
|
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 Export'
|
name: 'Blueprint Build'
|
||||||
description: 'Exports a blueprint addon'
|
description: 'Builds a blueprint addon'
|
||||||
outputs:
|
outputs:
|
||||||
file:
|
file:
|
||||||
description: 'The path to the exported addon file'
|
description: 'The path to the built addon file'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/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