Skip to content

Commit

Permalink
feature: add inputs in action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kosenda committed Feb 25, 2024
1 parent 6170c8d commit 160aa9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
# セットアップ
- name: Setup
uses: ./.github/actions/setup
with:
api_key: ${{ secrets.API_KEY }}

# モックのコンパイル
- name: Compile MockDebug
Expand Down

0 comments on commit 160aa9b

Please sign in to comment.