From 5d7e524578f6bcbf7ccde7bd4207d5168b4ace74 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:01:28 +0100 Subject: [PATCH] Create App_Header_Merge_update .app-headers inupdate-app-headers --- ...e_update .app-headers inupdate-app-headers | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/App_Header_Merge_update .app-headers inupdate-app-headers diff --git a/.github/workflows/App_Header_Merge_update .app-headers inupdate-app-headers b/.github/workflows/App_Header_Merge_update .app-headers inupdate-app-headers new file mode 100644 index 00000000..f28aa406 --- /dev/null +++ b/.github/workflows/App_Header_Merge_update .app-headers inupdate-app-headers @@ -0,0 +1,31 @@ +name: Update .app-headers with figlet output + +on: + workflow_run: + workflows: ["Merge main into update-app-headers"] + types: + - completed + +jobs: + update-app-headers: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Ensure .app-headers file exists silently + run: | + if [ ! -f ct/.app-headers ]; then + touch ct/.app-headers + fi + + - name: Update .app-headers with figlet output silently + run: | + for script in ct/*.sh; do + if grep -q 'APP=' "$script"; then + APP_NAME=$(grep -oP 'APP=\K\w+' "$script") + figlet "$APP_NAME" >> ct/.app-headers 2>/dev/null + fi + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}