From 160aa9b6f60faf55ed2a02202f81d4be29c9346c Mon Sep 17 00:00:00 2001 From: kosenda Date: Sun, 25 Feb 2024 16:37:50 +0900 Subject: [PATCH] feature: add inputs in action.yml --- .github/actions/setup/action.yml | 14 ++++++++++++-- .github/workflows/test.yml | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 5b28eb0d1..1788a72ca 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,12 +1,22 @@ +name: Setup + +inputs: + api_key: + description: "API Key" + required: true + runs: using: composite steps: + # マスクする + echo "::add-mask::${{ inputs.apiKey }}" + # ローカルプロパティの設定 - name: Set local.properties env: - API_KEY: ${{ secrets.API_KEY }} + API_KEY: ${{ inputs.API_KEY }} run: | - echo "apiKey=$API_KEY" >> ./local.properties + echo "apiKey=${{env.API_KEY}}" >> ./local.properties # JDKセットアップ - name: Setup JDK diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aeeaf4557..b52dd6729 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,6 +33,8 @@ jobs: # セットアップ - name: Setup uses: ./.github/actions/setup + with: + api_key: ${{ secrets.API_KEY }} # モックのコンパイル - name: Compile MockDebug