Skip to content

Commit

Permalink
feature: use Composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
kosenda committed Feb 25, 2024
1 parent 162dd05 commit 6170c8d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
21 changes: 21 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
runs:
using: composite
steps:
# ローカルプロパティの設定
- name: Set local.properties
env:
API_KEY: ${{ secrets.API_KEY }}
run: |
echo "apiKey=$API_KEY" >> ./local.properties
# JDKセットアップ
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle

# Gradleセットアップ
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
32 changes: 11 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- main
- develop
- feature/*
paths-ignore:
- README.md

# ジョブへの権限の割り当て
# ref: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
Expand All @@ -19,37 +21,25 @@ permissions:
actions: read

jobs:
# ビルドジョブ
build:
dependencies:
# ジョブを実行するマシンの種類を定義
# ref: https://docs.github.com/ja/actions/using-jobs/choosing-the-runner-for-a-job
runs-on: ubuntu-latest

# ジョブのステップを定義
steps:
# チェックアウト
- name: Checkout sources
uses: actions/checkout@v4

# ローカルプロパティの設定
- name: Set local.properties
env:
API_KEY: ${{ secrets.API_KEY }}
run: |
echo "apiKey=$API_KEY" >> ./local.properties
# JDKセットアップ
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

# Gradleセットアップ
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
# セットアップ
- name: Setup
uses: ./.github/actions/setup

# モックのコンパイル
- name: Compile MockDebug
run: |
./gradlew compileMockDebugSource
# test-prod:


# compile-mock:

0 comments on commit 6170c8d

Please sign in to comment.