[latex3-commits] [git/LaTeX3-latex3-latex2e] actions-daily-central: Add trigger action (d7aca40c)

Marcel Fabian Krüger tex at 2krueger.de
Tue Feb 28 02:36:46 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : actions-daily-central
Link       : https://github.com/latex3/latex2e/commit/d7aca40cc20d58e81c5eca29ba1d659286d64e22

>---------------------------------------------------------------

commit d7aca40cc20d58e81c5eca29ba1d659286d64e22
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Tue Feb 28 02:36:46 2023 +0100

    Add trigger action


>---------------------------------------------------------------

d7aca40cc20d58e81c5eca29ba1d659286d64e22
 .github/workflows/trigger.yaml | 53 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/.github/workflows/trigger.yaml b/.github/workflows/trigger.yaml
new file mode 100644
index 00000000..c1f1f3f6
--- /dev/null
+++ b/.github/workflows/trigger.yaml
@@ -0,0 +1,53 @@
+name: Manually refresh caches
+
+on:
+  workflow_dispatch:
+    inputs:
+      repository:
+        default: ctan
+        description: 'Repository URL'
+        required: false
+        type: string
+      delete-old:
+        default: false
+        description: 'Delete all caches'
+        required: false
+        type: boolean
+
+jobs:
+  rebuild-cache:
+    runs-on: ubuntu-latest
+    permissions:
+      actions: write
+      contents: read
+    steps:
+      - name: Check out code
+        uses: actions/checkout at v3
+
+      - name: Clean old caches
+        run: |
+          gh extension install actions/gh-actions-cache
+          
+          REPO="${{ github.repository }}"
+          BRANCH="${{ github.ref }}"
+          HASH_KEY="texlive-0-${{ hashFiles(".github/tl_packages") }}-"
+          DATE="$(date -I)"
+
+          if ${{ inputs.delete-old }}
+          then
+            HASH_KEY="$HASH_KEY-$DATE"
+          fi
+          set +e
+          gh actions-cache list -R "$REPO" -B "$BRANCH" --key "$HASH_KEY" | cut -f 1 | while read -r cacheKey
+          do
+            gh actions-cache delete "$cacheKey" -R "$REPO" -B "$BRANCH" --confirm
+          done
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Install TeX Live
+        id: texlive
+        uses: zauguin/install-texlive at 213da904a86854aefe2ce1ff508427a43258e042
+        with:
+          # List the required TeX Live packages in a separate file to allow reuse in
+          # different workflows.
+          package_file: .github/tl_packages





More information about the latex3-commits mailing list.