Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Custom GitHub Actions を作って Organization 内で共有する
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hiroyuki Kusu
April 28, 2022
Technology
600
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Custom GitHub Actions を作って Organization 内で共有する
YUMEMI.apk #6 (
https://yumemi.connpass.com/event/243080/
) の資料
Hiroyuki Kusu
April 28, 2022
More Decks by Hiroyuki Kusu
See All by Hiroyuki Kusu
モノレポのプルリクエストに最近、導入したもの
hkusu
2
590
GitHub composite actions
hkusu
2
440
Android の静的解析における SARIF ファイルの活用
hkusu
0
5.6k
CI_でライブラリのバージョンの変化をレポートする.pdf
hkusu
0
420
Maestro を GitHub Actions で動かす 〜Android編〜
hkusu
1
1.8k
Android の CI(GitHub Actions)の改善で、最近やったこと
hkusu
0
730
Tauri Mobile で生成される Android のコードを見てみる
hkusu
0
1.5k
GitHub Actions でユニットテストの結果をレポートする
hkusu
0
3.9k
Android で Multiplatform Settings を使う
hkusu
0
1.2k
Other Decks in Technology
See All in Technology
自宅LLMの話
jacopen
1
660
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
110
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
230
ザ・データベース、MySQL ~ OSC 2026 Sendai ~
sakaik
0
140
秘密度ラベル初心者が第1歩でつまづかないための「設計・運用」ポイント
seafay
PRO
0
240
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
320
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
1.3k
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
190
Kiroで書いた 設計書 が AI レビューの 採点基準 になる
ezaki
0
130
200個のGitHubリポジトリを横断調査したかった
icck
0
140
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
3k
Kiro Ambassador を目指す話
k_adachi_01
0
110
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Skip the Path - Find Your Career Trail
mkilby
1
150
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
850
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
Transcript
Custom GitHub Actions Λ࡞ͬͯ Organization Ͱڞ༗͢Δ 2022.4.28 YUMEMI.apk #6 Android
DevOps WG ( ϫʔΩϯάɾάϧʔϓ ) Hiroyuki Kusu ( @hkusu_ )
About me
5000ສਓͷΈΜͳ͕ͬͯΔ͋ͷαʔϏεɺ ΏΊΈ͕Ұॹʹ࡞ͬͯ·͢ɻ େखاۀٸελʔτΞοϓͱڞܕͰWeb/εϚϗͷαʔϏε࡞ΓԽࢧԉΛߦ͍ͬͯ·͢ɻ ʲΤϯδχΞ͕࠷Ͱ͖ΔձࣾNO.1ʳΛඪʹͨ͠ɺΞδϟΠϧ৫ͱͯ͠ઌΛΔΤϯδχΞूஂͰ͢ɻ
- name: Check ou t uses: actions/checkout@v 3 -
name: Set up JD K uses: actions/setup-java@v 2 with : distribution: 'zulu ' java-version: 1 1 cache: 'gradle ' - name: Buil d run: ./gradlew assembleDebug GradleͷґଘؔΛΩϟογϡ͢ΔػೳҰԠ͋Δ͕.. actions/setup-java Android ΞϓϦΛϏϧυ͢ΔϫʔΫϑϩʔͷྫ
buildSrc Android ͷόʔδϣϯΧλϩάߟྀ͍ͯ͠ͳͦ͏..
- name: Set up JD K uses: actions/setup-java@v 2
with : distribution: 'zulu ' java-version: 1 1 - name: Restore gradle cach e uses: actions/cache@v 3 with : path: | ~/.gradle/cache s ~/.gradle/wrappe r key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'buildSrc/src/*', '**/libs.versions.toml') } } restore-keys: | ${{ runner.os }}-gradle- ͍͠ར༻Օॴଟ͍.. Ͱ͖ΕଞͷϫʔΫϑϩʔ ଞͷϦϙδτϦͱڞ༗͍ͨ͠ʂ actions/cache ͰରԠ
https://docs.github.com/ja/actions/creating-actions/about-custom-actions Custom GitHub Actions
• Custom Actions public ϦϙδτϦͰ͋Δඞཁ͕͋Δ • Actions ͷίʔυΛखݩʹ
clone ͯ͠ར༻͢Δख͋Δ͕ɺͦͷҝ ͷτʔΫϯ͕ผ్ ඞཁͩ͠ɺԿΑΓ͍͜͠..
https://github.blog/changelog/2022-01-21-share-github-actions-within-your-enterprise/ ※ GitHub ͷܖϓϥϯ Organization ͷϙϦγʔʹΑͬͯར༻Ͱ͖ͳ͍͔ͳͷͰҙ͍ͩ͘͞ Organization ͷ internal
ϦϙδτϦ͕ར༻Ͱ͖ΔΑ͏ʹʂ
internal ϦϙδτϦͰ࡞
name: 'Setup Java for Android ' description: 'Set up
Java for Android and also cache Gradle dependencies. ’ inputs : distribution : description: 'Java distribution. Default is `zulu`. ' required: fals e default: 'zulu ' java-version : description: 'Java version. Default is `11`. ' required: fals e default: '11 ' skip-cache : description: 'Whether to skip cache restores and pushes. Default is `false`. ' required: fals e default: 'false ' outputs : cache-hit : description: 'A boolean value to indicate an exact match was found for the primary key. ' value: ${{ steps.cache.outputs.cache-hit } } runs : using: 'composite ' steps : - name: Set up JDK uses: actions/setup-java@v 2 with : distribution: ${{ inputs.distribution } } java-version: ${{ inputs.java-version } } - name: Restore gradle cach e if: inputs.skip-cache != 'true ' id: cach e uses: actions/cache@v3 with : path: | ~/.gradle/cache s ~/.gradle/wrappe r key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'buildSrc/src/*', '**/libs.versions.toml') } } restore-keys: | ${{ runner.os }}-gradle - ΦϓγϣϯͰڍಈΛมߋͰ͖ΔΑ͏ʹ
- name: Set up JD K uses: actions/setup-java@v 2
with : distribution: 'zulu ' java-version: 1 1 - name: Restore gradle cach e uses: actions/cache@v 3 with : path: | ~/.gradle/cache s ~/.gradle/wrappe r key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'buildSrc/src/*', '**/libs.versions.toml') } } restore-keys: | ${{ runner.os }}-gradle- - name: Set up Jav a uses: yumemi/setup-java-for-android@v1 ద༻ޙ ద༻લ
ͦͷଞ ͓͍ͬͯͨํ͕Α͍͜ͱ
name: Cache Generatio n on : push : branches:
# σϑΥϧτϒϥϯνओͨΔϚʔδઌϒϥϯν܊Λࢦఆ - mai n - develop * jobs : generate : name: Generat e runs-on: ubuntu-20.0 4 steps : - name: Check ou t uses: actions/checkout@v 3 - name: Set up Jav a id: cach e uses: yumemi/setup-java-for-android@v 1 - name: Download dependencie s if: steps.cache.outputs.cache-hit != 'true ' run: ./gradlew androidDependencies ϚʔδઌͷϒϥϯνσϑΥϧτϒϥϯνͰΩϟογϡΛ࡞͓ͬͯ͘ ϓϦϦΫΤετͰ Gradle ͷΩϟογϡΛར༻͍ͨ͠߹ ϓϧϦΫͷHEADϒϥϯνʹΩϟογϡ͕ແ͍߹ɺ ϓϧϦΫͷBASEϒϥϯν -> σϑΥϧτϒϥϯνͷॱ ͰΩϟογϡ͕ݕࡧ͞ΕΔɻ ௨ৗίʔυͷՃϓογϡ࣌ͷΈར༻Ͱ͖ΔΩϟγϡ͕ɺ ϓϧϦΫͷ৽نΦʔϓϯ࣌ʹར༻Ͱ͖ΔΑ͏ʹͳΔɻ
֤ϦϙδτϦͰར༻͢ΔτʔΫϯΛڞ༗ Organization secrets
https://speakerdeck.com/hkusu/cd ͬͪ͜ͷεϥΠυΈͯͶ
Thank you ! @hkusu_ ฐࣾ Android ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ