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
420
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
MIRU 2026 チュートリアル
keisuke198619
0
860
モバイルアプリ開発概論2026
recruitengineers
PRO
3
490
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
210
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
630
新しい SLO が良い感じにハマっている話
z63d
5
2.1k
【CEDEC2026】ゲームシナリオライターを支援するAIツール開発の実践 ― 設計とプロンプトの工夫 ―
cygames
PRO
1
770
ホームラボ紹介
y_sera15
0
110
攻撃と防御で学ぶAI時代のプロダクトセキュリティ演習
recruitengineers
PRO
6
2k
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
620
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
【Google Cloud Next Tokyo'26】Gemini Enterprise と Oracle AI Database で実現する、業務データ活用を実現する AI エージェント実装
shisyu_gaku
0
230
AIエージェントを前提としたプラットフォーム エンジニアリング:GKEで作るAgent-Ready Golden Path
legalontechnologies
PRO
2
210
Featured
See All Featured
Crafting Experiences
bethany
1
240
Skip the Path - Find Your Career Trail
mkilby
1
180
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
330
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
490
What's in a price? How to price your products and services
michaelherold
247
13k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
840
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Building AI with AI
inesmontani
PRO
1
1.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
200
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
160
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 ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ