forked from LiuYunPlayer/TuneLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1540e0e
commit f3171fa
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,12 +53,20 @@ jobs: | |
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-path: '"workspace/*.dll","workspace/*.exe"' | ||
|
||
- name: Find ELF files - MacOS and Linux | ||
if: runner.os != 'Windows' && github.event_name != 'pull_request' | ||
id: find-elf-files | ||
working-directory: ${{github.workspace}} | ||
run: | | ||
ELF_FILES=$(./CIUtils/find-executable.sh "workspace/") | ||
echo "::set-output name=elf_files::$ELF_FILES" | ||
- name: Generate artifact attestation - MacOS and Linux | ||
if: runner.os != 'Windows' && github.event_name != 'pull_request' | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-path: '"workspace/*.dll","workspace/ExtensionInstaller","workspace/TuneLab"' | ||
subject-path: '"workspace/*.dll",${{ steps.find-elf-files.outputs.elf_files }}' | ||
|
||
- name: Get short SHA | ||
uses: benjlevesque/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Check if a directory is provided as an argument | ||
if [ -z "$1" ]; then | ||
echo "Usage: $0 <directory>" | ||
exit 1 | ||
fi | ||
|
||
# Directory to search | ||
directory=$1 | ||
|
||
# Find ELF files in the specified directory | ||
files=$(find "$directory" -type f -exec sh -c 'file -b "$1" | grep -q "ELF" && echo "$1"' _ {} \;) | ||
|
||
# Initialize an empty string for the output | ||
output="" | ||
|
||
# Loop through each file and format it | ||
for file in $files; do | ||
if [ -z "$output" ]; then | ||
output="\"$file\"" | ||
else | ||
output="$output,\"$file\"" | ||
fi | ||
done | ||
|
||
# Print the formatted output | ||
echo $output |