Skip to content

Commit e7fef82

Browse files
committed
CI: virionの注入を改善
1 parent cf7a572 commit e7fef82

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,10 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18-
- name: Build plugin
19-
run: curl -sL https://raw.githubusercontent.com/pmmp/DevTools/1.16.0/src/ConsoleScript.php | php -dphar.readonly=0 -- --make ./ --out $OUTPUT_FILE
20-
21-
- name: Infect virions
22-
run: php -dphar.readonly=0 -r '
23-
file_put_contents("virion.php", file_get_contents("https://gist.githubusercontent.com/Nerahikada/a1fbb18c6fe4b2e10bb7baa7de9d0710/raw/virion.php"));
24-
$data = yaml_parse_file(".poggit.yml") ?:["projects" => [[]]];
25-
foreach(reset($data["projects"])["libs"] ?? [] as $lib){
26-
file_put_contents("virion.phar", file_get_contents("https://poggit.pmmp.io/v.dl/{$lib["src"]}/" . ($lib["version"] ?? "*")));
27-
(new Phar("virion.phar"))->addFile("virion.php", "virion.php");
28-
system("php -dphar.readonly=0 virion.phar ${{ env.OUTPUT_FILE }}");
29-
}'
18+
- name: Build plugin and infect virions
19+
run: |
20+
curl -sL https://raw.githubusercontent.com/pmmp/DevTools/1.16.0/src/ConsoleScript.php | php -dphar.readonly=0 -- --make ./ --out $OUTPUT_FILE
21+
curl -sL https://gist.githubusercontent.com/Nerahikada/a1fbb18c6fe4b2e10bb7baa7de9d0710/raw/infector.php | php -dphar.readonly=0 -- $OUTPUT_FILE
3022
3123
- uses: softprops/action-gh-release@v0.1.14
3224
with:

0 commit comments

Comments
 (0)