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
GitHubにおける GitHub Actions利用法/How GitHub uses Gi...
Search
Yuichi Tanaka
October 02, 2019
Programming
820
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GitHubにおける GitHub Actions利用法/How GitHub uses GitHub Actions
CI/CD Test Night #5 発表資料
https://testnight.connpass.com/event/145238/
Yuichi Tanaka
October 02, 2019
More Decks by Yuichi Tanaka
See All by Yuichi Tanaka
GitHub Copilot Tips and Tricks (en)
yuichielectric
1
340
GitHub Copilot Tips and Tricks
yuichielectric
43
20k
How GitHub uses Codespaces
yuichielectric
3
1.3k
30分でわかるシステム運用アンチパターン / Operations Anti Patterns in 30 minutes
yuichielectric
14
21k
オープンソースのベストプラクティスを企業内で実践/How to implement InnerSource
yuichielectric
12
19k
GitHubにおける継続的デリバリー/How GitHub builds and deploy software
yuichielectric
12
4.5k
InnerSourceのすすめ / InnerSource
yuichielectric
8
2k
GitHub Pro Tips
yuichielectric
0
260
Other Decks in Programming
See All in Programming
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
190
Oxcを導入して開発体験が向上した話
yug1224
4
340
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
220
Oxlintのカスタムルールの現況
syumai
6
1.2k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
950
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
はてなアカウント基盤 State of the Union
cockscomb
1
830
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
710
Chasing Engaging Ingredients in Design
codingconduct
0
230
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
240
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Transcript
None
@yuichielectric CI/CD Test Night #5 GitHubʹ͓͚Δ GitHub Actionsར༻๏
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ Who am I? ాத
༟Ұ (yuichielectric) Solutions Engineer, GitHub
GitHub Actions
GitHubʹΈࠐΈ 20δϣϒ·Ͱฒߦ࣮ߦ͕Մೳ ʢϦϙδτϦ͋ͨΓʣ Linux, macOS, WindowsʹՃ͑ίϯςφ ͷ࣮ߦՄೳ ϚτϦοΫεϏϧυ ࣮ߦதӾཡՄೳɺݕࡧɺ֤ߦ͕ϦϯΫԽ ͞Εͨϩά
https://github.com/ruby/ruby/actions
None
None
ॲཧΛίϯϙʔωϯτԽʢactionsͱݺͿʣ ͯ͠࠶ར༻͢Δࣄ͕Մೳ - Dockerίϯςφ - JavaScript ༷ʑͳΠϕϯτͰτϦΨʔՄೳ - GitHub্ͷͯ͢ͷWebhookΠϕϯτ
- cronه๏ʹΑΔఆظ࣮ߦ - HTTPϦΫΤετ
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ 1 name: CI Build
2 on: [push, pull_request] 3 jobs: 4 build: 5 runs-on: ${{ matrix.os }} 6 strategy: 7 matrix: 8 os: [ubuntu-latest, windows-latest, macOS-latest] 9 node-version: [8.*, 10.*, 12.*] 10 steps: 11 - name: Checkout the changes from Git 12 uses: actions/checkout@v1 13 - name: Use Node.js 14 uses: actions/setup-node@v1 15 with: 16 node-version: ${{ matrix.node-version }} 17 - name: Install dependencies 18 run: npm ci 19 - name: Execute tests 20 run: npm test 21 - name: Record code coverage 22 run: npx codecov 23 env: 24 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
https://github.com/marketplace?type=actions
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ GitHubࣾͰͷར༻ #1 - ύοέʔδϦϦʔεͷࣗಈԽ
- https://github.com/github/learning-lab-components
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ •τϦΨʔ: masterͷϚʔδ 1. υϥϑτϦϦʔεϊʔτʹه
2. package.jsonʹهࡌͷόʔδϣϯ্͕͕͍ͬͯͨΒϦϦʔεϊʔτΛpublish 3. όʔδϣϯ൪߸͕ηϚϯςΟοΫόʔδϣχϯάʹै͍ͬͯΔ͔Ͳ͏͔νΣοΫ 4. GitHub Package RegistryʹύοέʔδΛpublish https://github.com/github/learning-lab-components/blob/master/.github/workflows/release_management.yml ϫʔΫϑϩʔͷྲྀΕ
https://github.com/github/learning-lab-components/releases
https://github.com/github/learning-lab-components/packages/11396
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ 1. υϥϑτϦϦʔεϊʔτʹه release-drafter https://github.com/toolmantim/release-drafter
2. package.jsonʹهࡌͷόʔδϣϯ্͕͕͍ͬͯͨΒϦϦʔεϊʔτΛpublish node-draft-releaser https://github.com/JamesMGreene/node-draft-releaser 3. όʔδϣϯ൪߸͕ηϚϯςΟοΫόʔδϣχϯάʹै͍ͬͯΔ͔Ͳ͏͔νΣοΫ validate-semver-release https://github.com/JasonEtco/validate-semver-release 4. GitHub Package RegistryʹύοέʔδΛpublish npm publishίϚϯυΛ࣮ߦ https://github.com/github/learning-lab-components/blob/master/.github/workflows/release_management.yml ϫʔΫϑϩʔͷྲྀΕ
https://github.com/toolmantim/release-drafter
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ GitHubࣾͰͷར༻ #2 - ΣϒαΠτͷը૾αΠζͷ࠷దԽ
- https://github.com/customer-stories ϦϙδτϦprivateͰ͢ ><
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ •τϦΨʔ: push, pull-request 1.
ࠩதͷը૾ϑΝΠϧͷαΠζΛνΣοΫ͠ɺҰఆҎ্ͷαΠζͷը૾ ॖখͯ͠commit & push 2. ϓϧϦΫΤετʹαΠζͷࠩͷίϝϯτΛߘ ϫʔΫϑϩʔͷྲྀΕ
https://github.com/calibreapp/image-actions
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ 1 name: Compress images
2 on: pull_request 3 jobs: 4 build: 5 name: calibreapp/image-actions 6 runs-on: ubuntu-latest 7 steps: 8 - uses: actions/checkout@master 9 - name: calibreapp/image-actions 10 uses: docker://calibreapp/github-image-actions 11 env: 12 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ ࠓޙͷ༧ఆ
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ 2019/11/13ʹGA༧ఆ
Self hosted runner ࣗ͝ͷϋʔυΣΞ/VM্Ͱͷ࣮ߦ ۙʑఏڙ։࢝༧ఆ
https://twitter.com/natfriedman/status/1178321206321143808
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ • UIͷվળ • γϯλοΫεͷՃ
• ϒϥβ্ͰYAMLϑΝΠϧΛฤू͢ΔࡍͷΦʔτίϯϓϦʔτɺΤϥʔදࣔ • υΩϡϝϯτͷվળ ͦͷଞӶҙ։ൃத
https://github.com/features/actions
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ Tips
CI/CD Test Night #5 GitHubʹ͓͚ΔGitHub Actionsར༻๏ ϫʔΫϑϩʔϑΝΠϧͷݕࡧ