Tienson Qin 6 дней назад
Родитель
Сommit
c548542b43
1 измененных файлов с 23 добавлено и 0 удалено
  1. 23 0
      .github/workflows/encrypt-secrets.yml

+ 23 - 0
.github/workflows/encrypt-secrets.yml

@@ -0,0 +1,23 @@
+on:
+  workflow_dispatch:
+    inputs:
+      age_key:
+        description: 'Enter a public age key'
+        required: true
+        type: string
+jobs:
+  dump-and-encrypt-secrets:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install age
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y age
+      - env: ${{ secrets }}
+        run: |
+          env | age -a -e -r "${{ inputs.age_key }}" > env.age
+      - uses: actions/upload-artifact@v4
+        with:
+          name: env.age
+          path: env.age
+          retention-days: 1