SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
1
August 9, 2022
Lights, Camera, Action
GitHub Actions
Presented by Carl Dea, Sr. Developer Advocate | Azul
2
Lights, Camera, Action
GitHub Actions
3
"Anonymous Hacker" by dustball is licensed under CC BY-NC 2.0.
4
"190923-F-LI975-0399" by Of
fi
cial Travis AFB, Calif. is licensed under CC BY-NC 2.0.
"Virtual reality goggles are back" by Amy M.
Youngs is licensed under CC BY-NC-SA
2.0.
5
Datacenter Work
by Leonardo Rizzi
6
Manual SDLC/Methodologies Agile DevOps - CI/CD
Happy Programmer
by awcole72
191/365 Face Palm
by Will Hastings
7
Carl Dea


@carldea
• A Sr. Developer Advocate at Azul Systems


• Developing software for 20+ years


• Authored & Tech Reviewed Java books


• A JavaFX (fanboy) enthusiast


• Chesapeake Java User Group


• Loves sharing and advocating Java-based
technologies




Other interests:


Graphics, UI, Game programming, GEO spatial
data & map visualizations, Custom UI controls,
IoT, Smartphones, AI, and Robotics and Boating.




  Twitter: @carldea


GitHub: github.com/carldea


LinkedIn: www.linkedin.com/in/carldea


Email: carl.dea@gmail.com


JUG: www.meetup.com/chesapeakejug


About Me
8
Build, Test, Release,
Deploy
9
Dev - Ops
10
CI/CD Pipeline
Code, Build, Test, Release, Deploy
11
Question: Which automation tools do you use?
A. Jenkins
B. Travis
C. TeamCity
D. Bamboo
12
FREE! GitHub has CI/CD services!
"Github smoothie" Acarlos1000 Gift
by asenat29
13
Demo
14
Update JVM w/ Zero Downtime
Boss: Is it Ready to Go!


Me: The app is currently on JDK v17.0.3


Boss: The patched release is in CPU JDK v17.0.4


Me: Okay, give me a few minutes… Done!


Boss: Nice JOB! Take the day off! You deserve it!
15
Source Code
https://github.com/carldea/github-actions-demo
16
Acme - Architecture
JVM
Application
Docker Container
Watch Tower
Docker Container
Runner: Linux
Application
JVM
- Build


- Test


- Deploy
2
3
Push to DockerHub
1
Check For Latest Release
Detect Change
Replace Container
4
17
What is a GitHub
Workflow?
18
GitHub a Workflow
19
GitHub a Workflow
•push


•pull_request


•workflow_dispatch
Listens for Git Events
Run GitHub Actions
Runs On
•ubuntu-latest


•macOS-latest


•windows-latest
20
Workflow Templates
21
Lights, Camera, Action
GitHub Actions
GitHub Actions Marketplace
22
GitHub Actions Marketplace
23
GitHub a Workflow
24
GitHub a Workflow
25
GitHub Workflow
.github/workflows/my_workflow1.yml
•push


•pull_request


•workflow_dispatch
Common Events Used
26
GitHub Workflow
Job named “build”
27
GitHub Workflow
Runner on “ubuntu-latest”
28
One Runner per Job
Will run job on an Ubuntu machine
"Runner in 2012 Oakland Marathon" by PZAO is licensed under CC BY-NC-ND 2.0.
"Runners at the start of the 2012 Borgess Half Marathon" by Simon A. Thalmann is licensed under CC BY 2.0.
Can you have multiple Runners?
30
GitHub Workflow
runs-on: [ “ubuntu-latest” , “macOS-latest”, “windows-latest” ]
31
Creating a Strategy
Lookup?
32
GitHub Workflow
runs-on: ${{ matrix.os }}
33
GitHub Workflow
steps:


- uses: actions/checkout@v3
34
GitHub Workflow
steps:


- uses: actions/checkout@v3
Job
Runner
Steps
GitHub Actions
35
Let’s Execute Steps:

Scripts & GitHub Actions
36
GitHub Workflow
run: echo Hello world!
37
GitHub Workflow
run: |
38
GitHub Actions
40
actions/setup-java@v1
41
GitHub Workflow
uses: actions/setup-java@v1
42
GitHub Workflow
uses: actions/setup-java@v1
43
Benefits
uses: actions/setup-java@v1
•Supports all versions of the JDK since Java 6


•Supports early access releases


•Java-package can support jdk+fx or jre+fx


•All LTS releases are TCK tested
44
actions/setup-java@v3
45
GitHub Workflow
uses: actions/setup-java@v3
46
uses: actions/setup-java@v3
47
foojayio/setup-java@disco
48
GitHub Workflow
uses: foojayio/setup-java@disco
• Mandrel

• Microsoft

• OJDKBuild

• OpenLogic

• Oracle (contains only links to download site)

• Oracle OpenJDK

• Red Hat (contains only links to download site)

• SAP Machine

• Semeru

• Semeru Certi
fi
ed

• Temurin

• Trava

• Zulu

• Zulu Prime
49
DiscoAPI
uses: foojayio/setup-java@disco
At the moment the following distributions
are supported by the API:

• AdoptOpenJDK

• AdoptOpenJDK OpenJ9

• Bi Sheng

• Corretto

• Debian (contains only links to
download site)

• Dragonwell

• GraalVM CE (8, 11, 16)

• JetBrains

• Kona

• Liberica

• Liberica Native

•
50
oracle-actions/setup-java@v1
51
GitHub Workflow
uses: oracle-actions/setup-java@v1
52
GitHub Workflow
uses: oracle-actions/setup-java@v1
uses: foojayio/setup-java@disco
54
Manual SDLC Agile DevOps - CI/CD
Happy Programmer
by awcole72
191/365 Face Palm
by Will Hastings
Thank You.
Q/A
Twitter: @carldea


    Blog: foojay.io


  Github: https://github.com/carldea


   Email: carl.dea@gmail.com


LinkedIn: https://www.linkedin.com/in/carldea
Q&A
References
Articles and links
• GitHub Actions: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions


• PreInstalled Tools: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-
Readme.md


• GitHub-actions-demo - https://github.com/carldea/github-actions-demo


• HelloWorldGHActions - https://github.com/carldea/HelloWorldGHActions


• Part 1: https://foojay.io/today/github-actions-with-java-part-1/


• Part 2: https://foojay.io/today/github-actions-with-java-part-2/


• Part 3: https://foojay.io/today/lights-camera-action-github-actions-with-java-part-3/


• JDK security Updates by Simon Ritter: https://www.azul.com/resources-hub/java-security/the-importance-of-
java-security-updates
56

Weitere ähnliche Inhalte

Ähnlich wie KCDC_2022_GitHubActions_slide-share.pdf

ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp
 

Ähnlich wie KCDC_2022_GitHubActions_slide-share.pdf (20)

Be a Happier Developer with Git / Productive Team #gettinggitright
Be a Happier Developer with Git / Productive Team #gettinggitright Be a Happier Developer with Git / Productive Team #gettinggitright
Be a Happier Developer with Git / Productive Team #gettinggitright
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
GitHub for partners
GitHub for partnersGitHub for partners
GitHub for partners
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
 
Git workflows (Basics)
Git workflows (Basics)Git workflows (Basics)
Git workflows (Basics)
 
Webinar: Using Litmus Chaos Engineering and AI for auto incident detection
Webinar: Using Litmus Chaos Engineering and AI for auto incident detectionWebinar: Using Litmus Chaos Engineering and AI for auto incident detection
Webinar: Using Litmus Chaos Engineering and AI for auto incident detection
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)
 
Android Things: Android for IoT
Android Things: Android for IoTAndroid Things: Android for IoT
Android Things: Android for IoT
 
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastrutturaGitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Elevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDA
Elevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDAElevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDA
Elevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDA
 
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earthPittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
 
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubAIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
 

Kürzlich hochgeladen

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Kürzlich hochgeladen (20)

AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 

KCDC_2022_GitHubActions_slide-share.pdf