Microsoft acquires GitHub to combine GitHub's developer tools with Microsoft's capabilities in AI and security. GitHub Actions allow developers to automate workflows directly in code repositories through YAML configuration files. Reusable workflows allow sharing common steps between workflows to avoid duplication. GitHub hosted runners are virtual machines that automatically run and execute workflow steps. Self-hosted runners can be installed on-premises to run private workflows. Azure DevOps integrates with GitHub through linking work items to pull requests to track issues. DevSecOps practices can be enabled through integrating GitHub and Azure services for security and compliance.
26. Reusable workflows Composite actions
You can connect up to 4 levels of workflows
You can call a maximum of 20 reusable workflows
from a single workflow file.
Can be nested to have up to 10 composite actions in
one workflow
Can use secrets Cannot use secrets
Can use if: conditionals Cannot use if: conditionals
Can be stored as normal YAML files in your project Requires individual folders for each composite action
Can use multiple jobs Cannot use multiple jobs
Each step is logged in real-time Logged as one step even if it contains multiple steps
Source: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ with applied updates
28. ▪
▪
▪
▪
▪
▪
▪
▪
▪
Virtual environment YAML workflow
label
Notes
Windows Server 2022 windows-
latest or windows-
2022
The windows-latest label
currently uses the Windows
Server 2022 runner image.
Windows Server 2019 windows-2019
Ubuntu 22.04 ubuntu-22.04 Ubuntu 22.04 is currently in
public beta.
Ubuntu 20.04 ubuntu-
latest or ubuntu-
20.04
macOS 13 Ventura [Beta] Macos-13 or
macos-13-xl
macOS Monterey 12 macos-latest,
macos-12, macos-
latest-xl or macos-
12-xl
macOS Big Sur 11 or macos-11 The macos-latest label
currently uses the macOS 11
runner image.
Source: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
29. ▪
▪
name: CI
on:
push:
branches: [ main ]
jobs:
container-test-job:
runs-on: ubuntu-latest
container:
image: node:14.16
env:
NODE_ENV: development
ports:
- 80
volumes:
- my_docker_volume:/volume_mount
options: --cpus 1
steps:
- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found
dockerenv) || (echo No dockerenv)
44. Commit message Action
Fixed AB#123 Links and transitions the work item to the
"done" state.
Adds a new feature, fixes AB#123. Links and transitions the work item to the
"done" state.
Fixes AB#123, AB#124, and AB#126 Links to Azure Boards work items 123, 124,
and 126. Transitions only the first item, 123 to
the "done" state.
Fixes AB#123, Fixes AB#124, Fixes AB#125 Links to Azure Boards work items 123, 124,
and 126. Transitions all items to the "done"
state.
Fixing multiple bugs: issue #123 and user story AB#234 Links to GitHub issue 123 and Azure
Source: https://docs.microsoft.com/en-us/azure/devops/boards/github/link-to-from-github?view=azure-devops