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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
600
GitHub composite actions
hkusu
2
450
Android の静的解析における SARIF ファイルの活用
hkusu
0
5.7k
CI_でライブラリのバージョンの変化をレポートする.pdf
hkusu
0
430
Maestro を GitHub Actions で動かす 〜Android編〜
hkusu
1
1.8k
Android の CI(GitHub Actions)の改善で、最近やったこと
hkusu
0
740
Tauri Mobile で生成される Android のコードを見てみる
hkusu
0
1.6k
GitHub Actions でユニットテストの結果をレポートする
hkusu
0
3.9k
Android で Multiplatform Settings を使う
hkusu
0
1.3k
Other Decks in Technology
See All in Technology
Kiro Crew入門 - 常駐エージェントの仕組みと使いどころ / Intro to Kiro Crew
k_adachi_01
1
290
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.6k
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
150
Sets in Go
ramalho
1
910
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
110
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9.1k
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
270
Goでデータパイプラインを作ろう
sansantech
PRO
1
490
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
FDEの心得
noriakioji
5
6.2k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
670
Featured
See All Featured
Abbi's Birthday
coloredviolet
3
9.3k
Accessibility Awareness
sabderemane
1
180
Designing for humans not robots
tammielis
254
26k
The Cult of Friendly URLs
andyhume
79
7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
420
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Designing Experiences People Love
moore
143
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
670
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 ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ