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
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.6k
GitHub Actions でユニットテストの結果をレポートする
hkusu
0
3.9k
Android で Multiplatform Settings を使う
hkusu
0
1.2k
Other Decks in Technology
See All in Technology
プライバシー保護の理論と実践
lycorptech_jp
PRO
1
220
SRE歴2ヶ月でも開発6年の知見を活かして、チームで止まっていた環境改善を前に進めた話
a_ono
0
170
なぜ人は自分のプロジェクトを 「なんちゃってアジャイル」と 自嘲するのか
kozotaira
0
230
初めてのDatabricks勉強会
taka_aki
2
220
“ID沼入口” - 基本とセキュリティから始める、考え続けるためのID管理技術勉強会 告知&イントロ
ritou
0
360
Fabricをフル活用する AI Agent Hub -製造業特化AIエージェントの設計
iotcomjpadmin
0
180
AI・ロボティクスと自動化社会 / AI, Robotics, and the Automated Society
ks91
PRO
0
130
“全部コピーしない”ファイルデータの活用 : — FSx for ONTAP × S3 Tables × Icebergで作るメタデータカタログ
yoshiki0705
0
230
本当の”仕事”を手放せる未来が見えた
mu7889yoon
0
210
5分でわかるDuckDB Quack
chanyou0311
4
290
アラート調査向けAIエージェントの本番導入とその後/AI Agents for Alert Investigation: Production Deployment and After
taddy_919
1
310
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
330
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
180
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
210
Into the Great Unknown - MozCon
thekraken
41
2.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Git: the NoSQL Database
bkeepers
PRO
432
67k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
160
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
340
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.6k
We Have a Design System, Now What?
morganepeng
55
8.2k
ラッコキーワード サービス紹介資料
rakko
1
3.8M
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
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 ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ