Sfoglia il codice sorgente

Add GitHub Action to set file name for ak3zip

This action sets the file name for ak3zip based on branch, kernel version, and Android version inputs.
jimsterino98 4 mesi fa
parent
commit
ac4cf29735
1 ha cambiato i file con 28 aggiunte e 0 eliminazioni
  1. 28 0
      .github/actions/file-name/action.yml

+ 28 - 0
.github/actions/file-name/action.yml

@@ -0,0 +1,28 @@
+name: set file name for ak3zip
+description: set file name for ak3 zip
+inputs:
+ branch:
+  description: 'Device kernel'
+  required: true
+ android_version:
+  description: 'Android version (android14)'
+  required: true
+ kernel_version:
+  description: 'Kernel version (6.1)'
+  required: true
+
+runs:
+ using: composite
+ steps:
+  - name: set file name for ak3zip
+    shell: bash
+    run: |
+     ARTIFACT_BASE="${{ inputs.branch }}-${{ inputs.kernel_version }}-${{ inputs.android_version }}"
+          
+     # This gives: KSUxxxxx-branch-xxx-xxx
+     FILE_NAME="KSUN${KSU_VERSION}-${ARTIFACT_BASE}"
+      
+     echo "ARTIFACT_BASE=$ARTIFACT_BASE" >> $GITHUB_ENV
+     echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
+          
+     echo "✅ Final artifact name: $FILE_NAME"