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 Actions CI/CD Update
Search
bakunyo
August 18, 2019
Programming
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GitHub Actions CI/CD Update
bakunyo
August 18, 2019
More Decks by bakunyo
See All by bakunyo
合宿成果@日本色
bakunyo
0
140
AMP 完全に理解した
bakunyo
0
400
NNにふれてみて
bakunyo
0
1k
RoRoRoRoR
bakunyo
0
950
Other Decks in Programming
See All in Programming
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
700
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
570
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
160
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
210
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
250
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
1
220
関数型プログラミングのメリットって何だろう?
wanko_it
0
140
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
230
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
110
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
1.9k
スマートグラスで並列バイブコーディング
hyshu
0
280
Performance Engineering for Everyone
elenatanasoiu
0
260
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Context Engineering - Making Every Token Count
addyosmani
9
1k
How STYLIGHT went responsive
nonsquared
100
6.2k
First, design no harm
axbom
PRO
2
1.2k
Optimizing for Happiness
mojombo
378
71k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Unsuck your backbone
ammeep
672
58k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
270
Done Done
chrislema
186
16k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
890
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Transcript
GitHub Actions ۙگ 2019.8.18 Sun Shinjuku.LT@ຊڮ @bakunyo
About me • @bakunyo • freelance • ࠷ۙυϥϚʮ͋ͳͨͷ൪Ͱ͢ʯʹϋϚΓத
ࠓճͷ༰ • GitHub Actions: ࡢ10݄ͷ GitHub Universe Ͱ ൃද͞Εͨ৽ػೳʢݱࡏ β
൛ʣ • 2݄ͷ Shinjuku.LT ͰͦΕʹ͍ͭͯൃද • https://blog.bakunyo.com/2019/02/26/github-actions-git-pr- release/ • ࠓճͦͷ UPDATE
https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/
GitHub Special Product Announcement • 2019.08.08 GitHubHQ ͰΠϕϯτ͕։࠵͞Εͨ • ༰
GitHub Actions ͷ࠷৽ใʹ͍ͭͯ • ϝΠϯ built-in CI/CD ɺͦΕҎ֎৭ʑ
Documentation Update • Core Concepts ͕ཧ͞Εͨ • Workflow ͷఆ͕ٛ HCL
→ YAML ʹมߋ • (چ) https://developer.github.com/actions/ • (৽) https://help.github.com/en/categories/ automating-your-workflow-with-github-actions
Core Concepts ͕ཧ͞Εͨ name: Greet Everybody on: [push] jobs: build:
name: Greeting runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: ./hello-world-action with: who-to-greet: 'Octocat' id: hello - run: echo "The time was $ {{ steps.hello.outputs.time }}" workflow event job step instance workflow run
Workflow ͷఆ͕ٛ HCL → YAML ʹมߋ ɾ⾠ HCL ͷαϙʔτ 2019.9.30
·Ͱ ɾmigration tool ͕༻ҙ͞ΕͯΔ ɹhttps://help.github.com/en/articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax
࣮ߦͯ͠Έͨ $ ~/Downloads/migrate-actions Created workflow .github/workflows/release.yml Created workflow .github/workflows/push.yml You
can now delete your main.workflow file. If you have any .yml files in .github/workflows your main.workflow will be ignored. rm .github/main.workflow git add -A .github/main.workflow .github/workflows/*.yml git commit -m 'converted main.workflow to Actions V2 yml files' Thanks for being a ________.__ __ ___ ___ ___. _____ __ .__ / _____/|__|/ |_ / | \ __ _\_ |__ / _ \ _____/ |_|__| ____ ____ ______ / \ ___| \ __\/ ~ \ | \ __ \ / /_\ \_/ ___\ __\ |/ _ \ / \ / ___/ \ \_\ \ || | \ Y / | / \_\ \ / | \ \___| | | ( <_> ) | \\___ \ \______ /__||__| \___|_ /|____/|___ / \____|__ /\___ >__| |__|\____/|___| /____ > \/ \/ \/ \/ \/ \/ \/ __________ __ ___________ __ \______ \ _____/ |______ \__ ___/___ _______/ |_ ___________ | | _// __ \ __\__ \ | |_/ __ \ / ___/\ __\/ __ \_ __ \ | | \ ___/| | / __ \_ | |\ ___/ \___ \ | | \ ___/| | \/ |______ /\___ >__| (____ / |____| \___ >____ > |__| \___ >__| \/ \/ \/ \/ \/ \/ ɾWorkflow ຖʹYAMLϑΝΠϧ͕ࣗಈੜ͞ΕΔ ɾίϝϯτফ͑Δ ɾbranch Λ filter action Ͱఆظͨ͠ͱ͜ΖࣗͰॻ͖͑ͨํ͕ྑͦ͞͏ʢޙड़ʣ ɾ֓Ͷͳ͠
Before workflow "Create PR to master" { resolves = ["git-pr-release"]
on = "push" } action "Filter branch" { uses = "actions/bin/filter@24a566c2524e05ebedadef0a285f72dc9b631411" args = "branch develop" } action "git-pr-release" { uses = "bakunyo/git-pr-release-action@master" needs = ["Filter branch"] secrets = [ "GITHUB_TOKEN", ] env = { GIT_PR_RELEASE_BRANCH_STAGING = "develop" } }
After name: Create PR to master on: push: branches: -
develop jobs: filterBranch: name: Filter branch runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: git-pr-release uses: bakunyo/git-pr-release-action@master env: GIT_PR_RELEASE_BRANCH_STAGING: develop GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
What’s built-in CI/CD? • ͜Ε·Ͱͷ GitHub Actions Ͱ࣍ୈͰ CI/ CD
͋ΔఔͰ͖ͨ • ࠓճͷൃදͰ CI/CD Λαϙʔτ͢Δػೳ͕૿͑ͨ • ػೳΛෳ߹తʹར༻͢Δ͜ͱͰɺbuilt-in CI/CD ͱݴ͍ͬͯΔʢʁʣ
Matrix builds strategy: matrix: node: [6, 8, 10] os: [ubuntu-14.04,
ubuntu-18.04] ɾOSݴޠόʔδϣϯ͝ͱͷϏϧυΛฒྻͰͰ͖Δ ɾฒྻ 1 repository 20 jobs ·Ͱ ɾˣͷ߹ɺ 3 x 2 = 6 jobs ΛฒྻͰ࣮ߦՄೳ
Events on: push: branches: - master paths: - test/* schedule:
- cron: '0 * * * *' ɾ͜Ε·Ͱಉ༷ɺGitHub ͷ֤छΠϕϯτΛൃՐ݅ʹͰ͖Δ ɾBranch ͷϑΟϧλָ͕ʹͳͬͨ ɹʢ͜Ε·ͰϑΟϧλ༻ͷ GitHub Action Λ͏ඞཁ͕͋ͬͨʣ ɾՃ͑ͯɺpath ࢦఆ cron syntax ʹΑΔఆٛՄೳʹͳͬͨ
Live streaming logs ɾϩάΛϥΠϒετϦʔϛϯάͰ৴ ɾColor code Emoji Λαϙʔτ ɾ֤ߦ͕ϦϯΫͱͯ͠γΣΞՄೳ
Secret Store ɾSecrets Λཧ͢Δઐ༻ϖʔδ͕༻ҙ͞Εͨ uses: actions/hello-world@master env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK
}}
“GitHub Actions” Generally Available on November 13.
Reference • https://github.com/features/actions • https://live-stream.github.com/? utm_source=announcemet&utm_medium=email&utm_campaign=livestream-080619 • https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/ • https://help.github.com/en/categories/automating-your-workflow-with-github-actions