Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Custom GitHub Actions を作って Organization 内で共有する
Search
Hiroyuki Kusu
April 28, 2022
Technology
610
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
470
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
750
Tauri Mobile で生成される Android のコードを見てみる
hkusu
0
1.6k
GitHub Actions でユニットテストの結果をレポートする
hkusu
0
4k
Android で Multiplatform Settings を使う
hkusu
0
1.3k
Other Decks in Technology
See All in Technology
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
310
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
150
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
850
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
170
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
8
850
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
190
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
1.5k
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
340
SREは、MCPとAutopilotをこう使え!
kazumax55
2
750
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
150
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
0
2k
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
The SEO identity crisis: Don't let AI make you average
varn
0
560
Skip the Path - Find Your Career Trail
mkilby
1
230
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
How to make the Groovebox
asonas
2
2.4k
The SEO Collaboration Effect
kristinabergwall1
1
560
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Rails Girls Zürich Keynote
gr2m
96
14k
The agentic SEO stack - context over prompts
schlessera
0
940
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
230
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 ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ