mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🐛 Print file
This commit is contained in:
@@ -1,33 +1,47 @@
|
|||||||
name: Print Github Secrets
|
name: Print Github Secrets
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
ALL:
|
ALL:
|
||||||
description: "Whether to export all envs. Please be very careful. Make sure to delete the file after downloading"
|
description: "Whether to export all envs. Please be very careful. Make sure to delete the file after downloading."
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-envfile:
|
create-envfile:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Save all .envs file
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Save All Environment Variables to envs_all.env (If Enabled)
|
||||||
if: inputs.ALL
|
if: inputs.ALL
|
||||||
run: |
|
run: |
|
||||||
python -c "import os; file = open('.env_all', 'w'); file.write(os.environ['ALL']); file.close()"
|
python -c "import os; file = open('envs_all.env', 'w'); \
|
||||||
|
file.write(os.getenv('ALL', '')); file.close()"
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ALL: ${{ toJSON(secrets) }}
|
ALL: ${{ toJSON(secrets) }}
|
||||||
|
|
||||||
- name: Save ENVS
|
- name: Save ENVS Secret to envs.env
|
||||||
run: |
|
run: |
|
||||||
python -c "import os; file = open('.env', 'w'); file.write(os.environ['ENVS']); file.close()"
|
python -c "import os; file = open('envs.env', 'w'); \
|
||||||
|
file.write(os.getenv('ENVS', '')); file.close()"
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ENVS: ${{ secrets.ENVS }}
|
ENVS: ${{ secrets.ENVS }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Verify Created envs Files
|
||||||
uses: actions/upload-artifact@v4
|
run: |
|
||||||
|
echo "Checking if envs.env exist..."
|
||||||
|
ls -lha envs.env*
|
||||||
|
|
||||||
|
- name: Upload Environment Files as Artifact
|
||||||
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: github_secrets
|
name: github_secrets
|
||||||
path: .env*
|
path: envs*
|
||||||
|
if-no-files-found: error
|
||||||
|
|||||||
Reference in New Issue
Block a user