GitHub ActionsのSecretを誤って後悔しない様にコメントを追加 #4072
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Test | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the main branch | |
on: | |
push: | |
branches: [ main, feature/* ] | |
# pull_request_targetsにはしない。Public repoだからforkされるとsecretが読み込まれる | |
# NOTE: Dependabotでbuild-ios-debug,build-android-debugで毎回失敗するが仕方ないものとする。他のCIが通っていればOK | |
pull_request: | |
branches: [ main, feature/* ] | |
jobs: | |
build-ios-debug: | |
runs-on: macos-latest | |
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Prepare firebase config | |
run: make secret | |
env: | |
FILE_FIREBASE_IOS_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_IOS_DEVELOPMENT }} | |
FILE_FIREBASE_IOS_PRODUCTION: ${{ secrets.FILE_FIREBASE_IOS_PRODUCTION }} | |
DART_DEFINE_FROM_FILE_DEV: ${{ secrets.DART_DEFINE_FROM_FILE_DEV }} | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.6' | |
- run: flutter pub get | |
- name: Run iOS | |
run: flutter build ios --debug --no-codesign --target lib/main.dev.dart --dart-define-from-file=environment/dev.json | |
build-android-debug: | |
runs-on: macos-latest | |
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Prepare firebase config | |
run: make secret | |
env: | |
FILE_FIREBASE_ANDROID_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_ANDROID_DEVELOPMENT }} | |
FILE_FIREBASE_ANDROID_PRODUCTION: ${{ secrets.FILE_FIREBASE_ANDROID_PRODUCTION }} | |
DART_DEFINE_FROM_FILE_DEV: ${{ secrets.DART_DEFINE_FROM_FILE_DEV }} | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.6' | |
- run: flutter pub get | |
- run: flutter build apk --debug --target lib/main.dev.dart --dart-define-from-file=environment/dev.json | |
test: | |
runs-on: macos-latest | |
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.6' | |
- run: make secret | |
- run: flutter pub get | |
- run: flutter test | |
codegen: | |
runs-on: macos-latest | |
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.6' | |
- run: make secret | |
- run: flutter pub get | |
- run: flutter pub run build_runner build --delete-conflicting-outputs | |
- run: git diff --quiet --exit-code |