Hands-on GitHub Actions 1st Edition Chaminda
Chandrasekara install download
https://ebookmeta.com/product/hands-on-github-actions-1st-
edition-chaminda-chandrasekara/
Download more ebook from https://ebookmeta.com
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!
Hands-On Functional Test Automation: With Visual Studio
2017 and Selenium 1st Edition Chaminda Chandrasekara
https://ebookmeta.com/product/hands-on-functional-test-
automation-with-visual-studio-2017-and-selenium-1st-edition-
chaminda-chandrasekara/
Hands-on Azure Repos: Understanding Centralized and
Distributed Version Control in Azure DevOps Services
1st Edition Chaminda Chandrasekara
https://ebookmeta.com/product/hands-on-azure-repos-understanding-
centralized-and-distributed-version-control-in-azure-devops-
services-1st-edition-chaminda-chandrasekara-2/
Hands-on Azure Repos: Understanding Centralized and
Distributed Version Control in Azure DevOps Services
1st Edition Chaminda Chandrasekara
https://ebookmeta.com/product/hands-on-azure-repos-understanding-
centralized-and-distributed-version-control-in-azure-devops-
services-1st-edition-chaminda-chandrasekara/
Francophone Literature as World Literature Christian
Moraru
https://ebookmeta.com/product/francophone-literature-as-world-
literature-christian-moraru/
Sociology For Physiotherapists and Nurses
Dibyendunarayan Bid
https://ebookmeta.com/product/sociology-for-physiotherapists-and-
nurses-dibyendunarayan-bid/
Empire of Lies Torrio Empire Book 2 A Dark Mafia
Romance J L Beck
https://ebookmeta.com/product/empire-of-lies-torrio-empire-
book-2-a-dark-mafia-romance-j-l-beck/
Changing Trends in Human Thoughts and Perspectives
Science Humanities and Culture 1st Edition Jogamaya
Devi College
https://ebookmeta.com/product/changing-trends-in-human-thoughts-
and-perspectives-science-humanities-and-culture-1st-edition-
jogamaya-devi-college/
Distributed Systems with Node js 1st Edition Thomas
Hunter Ii
https://ebookmeta.com/product/distributed-systems-with-node-
js-1st-edition-thomas-hunter-ii-2/
A B A B A A Book of Pattern Play Brian P. Cleary
https://ebookmeta.com/product/a-b-a-b-a-a-book-of-pattern-play-
brian-p-cleary/
Ship Got Real Love at Sea 1st Edition T L Anderson
https://ebookmeta.com/product/ship-got-real-love-at-sea-1st-
edition-t-l-anderson/
Chaminda Chandrasekara and Pushpa Herath
Hands-on GitHub Actions
Implement CI/CD with GitHub Action
Workflows for Your Applications
1st ed.
Chaminda Chandrasekara
Dedigamuwa, Sri Lanka
Pushpa Herath
Hanguranketha, Sri Lanka
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub via the book’s
product page, located at www.​
apress.​
com/​
978-1-4842-6463-8. For
more detailed information, please visit http://​
www.​
apress.​
com/​
source-code.
ISBN 978-1-4842-6463-8 e-ISBN 978-1-4842-6464-5
https://doi.org/10.1007/978-1-4842-6464-5
© Chaminda Chandrasekara and Pushpa Herath 2021
This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks,
service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for
general use.
The publisher, the authors and the editors are safe to assume that
the advice and information in this book are believed to be true and
accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with
respect to the material contained herein or for any errors or
omissions that may have been made. The publisher remains neutral
with regard to jurisdictional claims in published maps and institutional
affiliations.
Distributed to the book trade worldwide by Springer
Science+Business Media LLC, 1 New York Plaza, Suite 4600, New
York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
orders-ny@springer-sbm.com, or visit www.springeronline.com.
Apress Media, LLC is a California LLC and the sole member (owner) is
Springer Science + Business Media Finance Inc (SSBM Finance Inc).
SSBM Finance Inc is a Delaware corporation.
May this book help all the developers who are starting to use GitHub
Actions.
Introduction
GitHub is the most widely used source code repository provider. It is
embraced by the open source community and by many software
development companies. Today, source code is essentially required to
have continuous integration and continuous delivery/deployments
(CI/CD) to target environments because automation has become a
norm in software development practices and includes the wide
adoption of agility.
GitHub repositories can be integrated with third-party CI/CD
integration tools, such as Jenkins or Azure DevOps. Since Microsoft’s
acquisition, GitHub repos are now closely integrated with Azure
DevOps. However, bringing all GitHub customers to use Azure
DevOps is a tough ask, considering the wide adoption of GitHub by
open source and non-Microsoft software development technology
users.
GitHub Actions facilitate a state-of-the-art CI/CD workflow
platform inside GitHub. The actions provide options to implement
build and deployment workflows within GitHub. GitHub Actions
enable pull request validation to enhance repository branch stability
to the next level by assuring the code compilation state with each
merge.
This hands-on book was written as a day-to-day reference for
developers and Ops teams to build quality CI/CD workflows. The
book offers in-depth lessons on implementation patterns, solutions
for different technology builds, guidelines for implementing custom
components as actions, and descriptions of the features available
with GitHub Actions workflows to set up CI/CD for your repositories.
The book consists of sample code in each lesson to guide you
through getting started with GitHub Actions workflows in your web or
mobile applications, targeting any platform and any language. In
addition to using GitHub-hosted machines (runners) to run the
workflows, the book guides you through setting up your machines as
runners for GitHub Actions. A detailed exploration of the available
actions, syntax usage reference guides, and custom action
implementation for your specific needs provide all the essentials you
need to implement GitHub Actions workflows for your GitHub
repositories.
Acknowledgments
We are thankful to all the mentors who have encouraged and helped
us during our careers and who have provided us with so many
opportunities to gain the maturity and the courage needed to write
this book.
We would also like to thank our friends and colleagues who have
helped and encouraged us in so many ways.
Last, but in no way least, we owe a huge debt to our families,
not only because they have put up with late-night typing, research,
and our permanent air of distraction, but also because they have had
the grace to read what we have written. Our heartfelt gratitude is
offered to them for helping us make this dream come true.
Table of Contents
Chapter 1:​Introduction to GitHub Actions
Continuous Integration and Continuous Delivery
Importance of Software Delivery Automation
Introduction to GitHub Actions
Action
Artifacts
Event
GitHub-Hosted Runners
Job
Self-Hosted Runner
Step
Workflow
Summary
Chapter 2:​Getting Started with GitHub Actions Workflows
Using Preconfigured Workflow Templates
Using Marketplace Actions to Create Workflows
Understanding the Structure of a Workflow
Setting up Continuous Integration Using GitHub Actions
Building a .​
NET Core Web App with GitHub Actions
Summary
Chapter 3:​Variables
Defining and Using Variables
Variables in the Entire Workflow Scope
Variables in Job Scope
Variables in Step Scope
Using the set-env Command
Default Variables
Naming Considerations for Variables
GITHUB_​Prefix
Case Sensitivity
_​
PATH Suffix
Special Characters
Summary
Chapter 4:​Secrets and Tokens
Defining and Using Secrets
Repo-Level Secrets
Organization-Level Secrets
Naming Secrets
Using Secrets in Workflows
Limitations with Secrets
GITHUB_​
TOKEN
Summary
Chapter 5:​Artifacts and Caching Dependencies
Storing Content in Artifacts
5.​
02:​Cashing Workflow Dependencies
Summary
Chapter 6:​Using Self-Hosted Runners
Setting up a Windows Self-Hosted Runner
Setting up a Linux Self-Hosted Runner
Summary
Chapter 7:​Package Management
Creating a NuGet Package with dotnet pack
Creating a NuGet Package Using a nuspec File
Using Packages in GitHub Packages
Summary
Chapter 8:​Service Containers
Service Containers and Job Communication
Job Running as a Container
Jobs Running Directly on a Runner Machine
Using a Redis Service Container
Run a Workflow Job as a Container in the Runner
Run a Workflow Job Directly in the Runner
Summary
Chapter 9:​Creating Custom Actions
Types of Actions
Creating Custom Actions
JavaScript Custom Action
Composite Run Steps Action
Docker Container Action
Publishing Custom Actions
Summary
Chapter 10:​A Few Tips and a Mobile Build Example
Variable Usage Differences
Default Variables with $variablename Syntax
Using Variables in PowerShell Core in Action Steps
Workflow Job Status Check
Android Build and Push to MS App Center for Distribution
Summary
Index
About the Authors
Chaminda Chandrasekara
is a Microsoft Most Valuable Professional (MVP) for Visual Studio ALM
and Scrum Alliance Certified ScrumMaster. He focuses on and
believes in continuous improvement of the software development life
cycle. He is the Cloud Development and DevOps Architect at
eKriegers (Pvt) Ltd.
Chaminda is an active Microsoft Community Contributor (MCC)
who is well recognized for his contributions in Microsoft forums,
TechNet galleries, wikis, and Stack Overflow. He contributes
extensions to Azure DevOps Server and Services (former VSTS/TFS)
in the Microsoft Visual Studio Marketplace. He also contributes to
other open source projects on GitHub. Chaminda has published six
books with Apress.
Pushpa Herath
is a Microsoft Most Valuable Professional (MVP) working as a Senior
DevOps Engineer at 99x. She has many years of experience in Azure
DevOps Server and Services (formerly VSTS/TFS), the Azure cloud
platform, and QA automation. She is an expert in DevOps, currently
leading the Sri Lanka DevOps community.
Pushpa has in-depth knowledge of the Azure cloud platform tools
in her community activities. She has published four books with Apress
and speaks at community events on her Sri Lanka DevOps
community’s YouTube channel. Pushpa blogs on technology at
DevOps Adventure.
About the Technical Reviewer
Mittal Mehta
has 18 years of IT experience. He is a DevOps architect and a
Microsoft Certified Professional with development experience in TFS,
C#, ASP.​
net, Navision, and Azure DevOps. He has worked with
Microsoft automation, configuration, and DevOps processes for the
past ten years.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
C. Chandrasekara, P. HerathHands-on GitHub Actions
https://doi.org/10.1007/978-1-4842-6464-5_1
1. Introduction to GitHub Actions
Chaminda Chandrasekara1
and Pushpa Herath2
(1)
Dedigamuwa, Sri Lanka
(2)
Hanguranketha, Sri Lanka
GitHub is the most widely embraced repository platform for software
developers and open source communities. Large enterprises and
individual developers use the GitHub platform to keep versioned
source code. GitHub can be integrated with Azure Pipelines and other
CI/CD (continuous integration and continuous deployment) tools to
provide software delivery automation. Instead of using third-party
integrations for GitHub repositories, you can now use GitHub Actions
as workflows to implement CI/CD pipelines.
This chapter briefly explores CI/CD to help you understand why
software delivery automation is vital for software development teams
to succeed and be competitive. It also introduces GitHub Actions’
basic concepts to prepare you for the upcoming chapters in the book.
Continuous Integration and Continuous
Delivery
In software development, multiple team members develop code and
contribute to creating the software’s functionality. When multiple
people contribute to a code base, it is important to maintain its
integrity and ensure that any team member can retrieve the latest
version and build and run it locally.
Two important aspects should be maintained to assure the code
base's stability. The first aspect is to ensure that the code is
compiling without errors. The second aspect is to ensure that all unit
tests validating code behavior pass, including the latest code
changes, at a very high percentage.
A build pipeline should be defined to compile each check-
in/commit to the code base and then execute all unit tests to validate
the code base to ensure its stability; this is generally known as a CI
build. If the build successfully compiles and all the unit tests pass, it
generates and publishes output that is deployed to a target
environment (see Figure 1-1).
Figure 1-1 Continuous integration
Checking for code security vulnerabilities can be integrated into
the build pipeline to improve a project/product’s security. The quality
of the code can be validated in a build pipeline. Early detection of
security vulnerabilities and code quality issues with a shift-left
approach reduces costs in the long run because a vulnerability
detected during production is costly to fix.
Development teams produce software in short cycles in modern,
agile software development approaches. One of the biggest
challenges is ensuring a software release’s reliability in target
environments. A straightforward and reusable deployment process is
essential in reducing the cost, time, and risks of delivering software
changes, including incremental updates to an application in
production. In a nutshell, continuous delivery ensures that software
changes are delivered more frequently and reliably. DevOps has
evolved as a product of continuous delivery.
Continuous delivery ensures that every change is deployed to
production with the option to hold deployment until manual approval
is given. Continuous deployment allows every change to be
automatically deployed to production. To implement continuous
deployment, you must have continuous delivery already in place.
Continuous deployment is created by automating the approval steps
in continuous delivery (see Figure 1-2).
Figure 1-2 Continuous delivery vs. deployment
Importance of Software Delivery Automation
Software delivery automation involves a few processes. Code
compilation validation, code stability, quality, and security are covered
in continuous integration. Integration and functional test automation
verify that business needs are being met in software systems.
Release or deployment automation delivers and manages deployment
configurations automatically. Using infrastructure as code (IaC) and
deploying infrastructure with automated pipelines offers a dynamic
provisioning environment to a software team, essentially facilitating
the agile process and enhancing the DevOps team’s capabilities.
Without software process automation, deploying software would
be a challenging task. An Ops team would need to spend a lot of time
manually setting up and deploying new environments. There would
be a higher possibility of missed steps during setup, leading to a
variety of unexpected issues that cost time and money to resolve.
Setting up and deploying environments requires additional investment
in human resources (see Figure 1-3 (data from IBM System Science
Institute Relative Cost of Fixing Defects research gate)).
Figure 1-3 Cost of bugs
Skipping tests may result in bugs creeping into production, which
would cost more money or cause client dissatisfaction and lead to
legal action or harm your business reputation. And again, testing
manually costs money and delays deliverables. There is a critical
need for test automation to avoid additional costs and software
delivery issues (see Figure 1-4 (data from
https://qodestack.com/myths-of-test-automation/)).
Figure 1-4 Automated testing vs. manual testing
Automating deployment and testing processes while identifying
security and other software vulnerabilities with a shift-left approach is
vital. Detecting vulnerabilities as early as possible (on the left side of
process flow if possible) costs less money than to fix them.
Introduction to GitHub Actions
GitHub Actions are a set of actions in a GitHub repository workflow.
These actions allow you to customize and execute software
development workflows. You can create actions or utilize existing
actions and create and customize workflows to perform any job or
automate software development life cycle processes, including CI/CD.
Actions are individual tasks that can be combined to create a
workflow. A workflow is one or more automated jobs with actions
configured in a YAML file that can be stored in your GitHub repo.
Let’s discuss each key concept in more detail.
Action
The smallest building block of a workflow is an action, which can be
identified as an individual task. These tasks or steps can be combined
to create a job that can be executed in a workflow. Existing actions
from the marketplace can create jobs and workflows, and you can
customize or create your own actions. An action must be used as a
step in a job to be used in a workflow.
You need to combine actions into a job to make up a workflow
that can check out a repository, and build and publish artifacts.
Artifacts
The files generated when you build your software project or test your
software project are artifacts. Artifacts may contain the binary
packages required to deploy your software and any support files,
such as configurations or infra-scripts required for deployment
activities. Artifacts can be created in one job and used in another job
for deployment actions in a workflow.
Event
An event triggers a workflow in GitHub Actions. Once a code change
is pushed, or a pull request is made, an event can be set up in
GitHub Actions to trigger the workflow. You can configure external
triggers using a repository dispatch webhook. You can also use many
other webhooks, such as deployment, workflow dispatch, and check
runs.
GitHub-Hosted Runners
Hosted runners are machines similar to hosted agents in Azure
DevOps pipelines. They are supported in Windows, Linux, and
macOS. These machines are preinstalled with commonly used
software. You cannot customize a hosted runner’s hardware
configuration. A GitHub-hosted runner virtual environment contains
hardware configuration, operating system, and installed software
information. You can find installed software and OS information at
https://github.com/actions/virtual-
environments/tree/main/images.
Job
A job is a set of steps set up to run in a single runner. A job can
comprise one or more actions. Jobs can run in parallel in a single
workflow, and you can set up dependencies to run jobs sequentially.
A dependent job will not run if the dependencies fail. Each job in a
workflow runs in a fresh instance of a runner. A job should specify the
runner’s OS and the version.
Self-Hosted Runner
You can set up a self-hosted runner on a virtual or physical machine
and connect it to a GitHub repo to run your jobs. Self-hosted runners
are useful when you have special hardware configurations or
software requirements for building your applications or running your
jobs. Self-hosted runners are discussed more in Chapter 6.
Step
A task that is an action or a command is identified as a step. All steps
in a job run in the same runner. The file system’s information is
shared with multiple steps (actions and commands) in a single job.
Workflow
In a GitHub repo, the process set up in a YAML file defining the build,
test, package, or deployment jobs is called a workflow. A workflow is
scheduled to run based on triggers/events, similar to Azure DevOps
builds and releases. A workflow may contain one or more jobs set up
to run sequentially or in parallel, depending on the requirements.
Workflow File
The YAML file stored in the github/workflows/ folder in your GitHub
repository is a workflow file. The workflow file is defined with the
workflow, which runs based on the events.
Workflow Run
A workflow executes based on the preconfigured triggers/events. A
workflow run is similar to a build or release pipeline run in Azure
DevOps. Logs tell you about failed jobs or successful job activities.
Each workflow runs logs for the jobs and actions or commands
executed.
Summary
This chapter looked at CI/CD concepts and the importance of
automation in the software delivery process. It explored a few
important key concepts in GitHub Actions to set the stage for the rest
of the chapters in this book.
The next chapter starts using GitHub Actions by looking at
preconfigured workflow templates and marketplace actions. You
create a GitHub Actions workflow to build a .NET Core application.
You learned about the structure of a workflow in this chapter and set
up continuous integration with GitHub Actions in the next chapter.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
C. Chandrasekara, P. HerathHands-on GitHub Actions
https://doi.org/10.1007/978-1-4842-6464-5_2
2. Getting Started with GitHub
Actions Workflows
Chaminda Chandrasekara1
and Pushpa Herath2
(1)
Dedigamuwa, Sri Lanka
(2)
Hanguranketha, Sri Lanka
Automated deployment and delivery pipelines increase software
development process efficiency, increase team productivity, and
enhance the ability to deliver software rapidly without compromising
quality. GitHub Actions workflow features allow users to configure
various deployment and delivery pipelines to support different
technologies.
In this chapter, you learn about GitHub Actions workflows. We
discuss the components that are important for configuring build and
deployment pipelines.
GitHub Actions workflows are configured using preconfigured
workflow templates or Marketplace actions, which you learn to work
with in this chapter. This chapter also explains GitHub Action
workflows’ structure and continuous integration capabilities by using
a sample .NET Core application pipeline.
Using Preconfigured Workflow Templates
A GitHub Actions workflow is a YAML file that consists of automated
process instructions. It is made of jobs, events, steps, actions, and
runners. Steps are identified as the tasks executed by the job, which
runs Actions and commands. One workflow can have one or multiple
independent or dependent jobs. The workflow file needs a
mechanism to configure automated triggers, and events
automatically decide which activity triggers the workflow. A runner is
a machine on which the GitHub Actions runner application is installed.
Workflow jobs are executed using the runner provided in the
workflow script.
Today, the information technology industry uses more tools and
technologies than ever before. Hence, more hosting platforms are
available in the market that can be integrated with deployment tools.
GitHub has multiple predefined workflow templates to create
automated build and deployment processes. To find these workflow
templates, go to the GitHub repository, and move to Actions. You can
find continuous integration and deployment workflow templates on
this page (see Figure 2-1).
Figure 2-1 Workflow templates
You see the deployment workflow templates for all the main
cloud platforms, such as Azure, AWS, Google Cloud, and IBM Cloud.
Clicking the “Set up this workflow” button opens a template workflow
YAML file, which you can edit to fit your requirements (see Figure 2-
2).
Figure 2-2 Workflow template YAML file
In addition to continuous deployment workflow templates, there
are continuous integration workflow templates to build applications
using different technologies, such as Ruby, Java, .NET, Python, and
more. Like the deployment workflow template, integration workflow
is also a YAML file consisting of basic build steps that you can edit
according to your requirements.
The workflow template consists of all the basic sections required
to set up a build pipeline or deployment pipeline.
Using Marketplace Actions to Create Workflows
A GitHub workflow is a collection of multiple components. Of all the
components, an action is the smallest portable building block in the
workflow. There are two types of GitHub Actions: publicly available
actions (a.k.a. Marketplace actions) and self-defined actions. This
section explains how to work with Marketplace actions.
You can access Marketplace actions from two places; one is from
the workflow editor. Since you have already learned about the
workflow template, let’s add an action from the workflow editor page
(see Figure 2-3).
Figure 2-3 Marketplace actions
Select the action that needs to be added to the workflow. A
YAML script is added to the workflow YAML file. For this example,
let’s select Download a Build Artifact (see Figure 2-4).
Figure 2-4 Marketplace action YAML script
To install the Marketplace action in the workflow, copy the YAML
script under the Installation section of the Marketplace action. Select
the relevant action version before copying the YAML script. Paste the
copied YAML action in the steps section of the workflow. Provide all
the relevant details for the action.
Understanding the Structure of a Workflow
In this section, you learn about the structure of a workflow.
To set up a workflow, go to Actions in your repo. You see a “set
up a workflow yourself” link to start the workflow creation process
without using templates (see Figure 2-5).
Figure 2-5 Creating a workflow from scratch
A YAML file opens with a basic workflow configuration structure.
You can follow the YAML file structure to build the workflow according
to your needs.
Let’s discuss each section of the workflow. A manually created
workflow template is set up as follows.
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on
push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run
sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed
as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so
your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
Workflow files should be saved in github/workflows in the
repository root. You can define the exact triggering condition for each
workflow. You can set up event triggers, schedule triggers, and
manual triggers. A workflow_dispatch event should be activated in
your workflow to enable a manual trigger, as shown next.
name: MyManualBuild
on: [workflow_dispatch]
This enables the Run workflow button (see Figure 2-6).
Figure 2-6 Run workflow manually
You learn about triggers in the next section. Another important
component of GitHub Actions is the runner. A runner is a machine or
container that executes the workflow. A runner is defined with a
runs-on keyword. You can use two types of runners: GitHub-hosted
runners or self-hosted runners. Setting up self-hosted runners is
discussed in Chapter 6. Each job needs to specify a name and runner.
The following specifies a runner hosted by the latest Ubuntu runner
(machine).
jobs:
# This job name is mybuild
mybuild:
# Runner type that the job will run on
runs-on: ubuntu-latest
A job is another major part of a workflow. A workflow can have
one or more jobs. By default, jobs run in parallel. Hence, if you need
to run jobs one after another, dependency should be defined. For
example, in the following workflow, the AppCenterDistribute job
needs the Android job to complete before it can execute.
Dependency is defined with the needs: DependingJobName syntax in
each job scope.
jobs:
Android:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
# omitted steps for brevity
AppCenterDistibute:
runs-on: ubuntu-latest
needs: Android
steps:
All workflow steps and actions are defined in a workflow job. The
following uses AppCenterDistribute job steps as an example. This
example uses a secret in a step, which we discuss in Chapter 4.
AppCenterDistibute:
runs-on: ubuntu-latest
needs: Android
steps:
- uses: actions/download-artifact@v2
with:
name: my-artifact
- name: App Center
uses: wzieba/AppCenter-Github-Action@v1.0.0
with:
# App name followed by username
appName: Ch-DemoOrg/demoapp
# Upload token - you can get one from
appcenter.ms/settings
token: ${{ secrets.AppCenterAPIToken }}
# Distribution group
group: alphatesters
# Artefact to upload (.apk or .ipa)
file:
AwesomeApp/AwesomeApp.Android/bin/Debug/com.companyname.AwesomeA
pp.apk
# Release notes visible on release page
releaseNotes: "demo test"
So far, you have gained a basic understanding about a
workflow’s YAML structure. Now, let’s discuss workflow runs.
Go to Actions in the GitHub repository. You find a list of the
workflows run, as shown in Figure 2-7 (see the area labeled 2). (We
assume that by now you have created at least one workflow, utilizing
an available template or sample structure created when you selected
the “Set up workflow yourself” option). You can also see run history
information for the selected workflow, including run duration,
commit, branch, and actor details (see the area labeled 3 in Figure 2-
7). If you click one of the run history records listed, you move to a
detailed view of the run.
Figure 2-7 Workflow runs
Click the workflow run history to navigate to the workflow details
page (see Figure 2-8).
Figure 2-8 Workflow run details
You see the workflow name (see the area labeled 1). If you click
“build” (your build job may have a different name based on your
YAML), it navigates to the build logs, where you can find all the
important details regarding the build (see Figure 2-9).
Figure 2-9 Log of workflow steps
You now have a basic understanding of a GitHub Actions
workflow.
Setting up Continuous Integration Using
GitHub Actions
Setting up continuous integration is a very important section of the
pipelines. It enables teams to ensure that the submitted code is
validated. The required important branches are protected, and the
deployment happens as expected. In this section, you learn about
triggers in GitHub Actions and how to control them in different
conditions.
When configuring triggers, you need to identify the starting
event, which explains the pipeline’s situation. Three main events
trigger a GitHub Actions pipeline: pushing a commit to the repository,
creating an issue, and creating a pull request.
An event is defined using on: syntax. As shown in the following
example, a workflow triggers when it pushes changes to the master
branch.
on:
push:
branches: [ master ]
Similarly, you can trigger both a push and a pull request
targeting the master branch, as shown next.
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
You can use a scheduled event as a trigger using cron: syntax.
Discovering Diverse Content Through
Random Scribd Documents
Fig. 503.
2. Unt. Blätt. bis auf den Grund 5–7teilig; Zipfel keilf., unterseits
seidenhaarig glänzend. 6–8. An Felsen der höheren Gebirge
Alpen-F., A. alpina L.
— Untere Blätt. höchstens bis zur Mitte gespalt.
3
Fig. 504.
3. Blattzipfel ringsum gesägt, unt. Blätt. nicht bis zur Mitte gespalten
(Fig. 504). 5–10. Wiesen, Wälder, häufig
Wiesen-F., A. vulgáris L.
— Blattzipfel am Grunde ganzrand.; untere Blätt. bis zur Mitte
geteilt. 7. Riesengebirge.
Gespalt. F., A. fissa Schummel
12. Sanguisórba L., Wiesenknopf. IV.
Alle Bltn mit Stbblätt. und Stempel; Köpfchen eif.-längl. (Fig. 505),
dunkelbraun; Fiederblättch. herzf.-längl. 6–8. Wiesen
Großer W., S. officinális L.
Fig. 505.
Obere Bltn des Köpfchens mit Stempeln, die unt. mit Stbblätt.;
Köpfchen kugelig (Fig. 506), erst grün, dann rötlich; Blättch.
rundl. od. eif.-längl. 5–7. Trockene Hügel
Kleiner W., S. minor Scopoli
Fig. 506.
13. Agrimónia L., Odermennig. XI.
1. Blättch. unterseits nur auf den Nerven zerstr. steifhaarig; Frbecher
der ganzen Länge nach gefurcht; Stacheln am Grunde des
Frbechers nach oben gerichtet, dicht zusammenneigend. 7. Nur
in Ostpreußen.
Behaarter O., A. pilósa Ledebour
— Blättch. unterseits kurz grauhaarig, längl. bis längl.-lanzettl.
2
2. Frbecher verkehrt-kegelf., der ganz. Länge nach tief gefurcht,
äußere Stacheln weit abstehend (Fig. 507). 6–8. Wegränder,
buschige Hügel, verbreitet
Kleiner O., A. eupatória L.
Fig.
507.
— Frbecher halbkugelig-glockig, nur bis zur Mitte seicht gefurcht,
äußere Stacheln zurückgeschlagen (Fig. 508). 6–8. Waldränder,
Gebüsche, sehr zerstr.
Großer O., A. odoráta Miller
Fig. 508.
14. Rosa L., Rose. XII.
1. Stacheln des Schößlings ungleich, gerade od. gekrümmte derbere
mit borsten- od. nadelf. untermischt
18
— Stacheln des Schößlings ziemlich gleich, gerade od. gebogen (bei
R. rubiginosa und R. elliptica auch ungleich)
2
2. Griffel zu einem Säulchen von der Länge der Stbblätt. verwachsen
17
— Griffel meist als kurzes Köpfchen hervorragend, viel kürzer als die
Stbblätt. (nur bei R. micrantha und R. agrestis verläng.)
3
3. Blättch. unterseits mehr oder weniger drüsig, zuweilen nur auf
den Nerven. (Bei einigen Arten finden sich die Drüsen in der Behaarung
versteckt)
8
— Blättchen unterseits drüsenlos. (Von R. tomentella und R. tomentosa
kommen auch drüsenlose Formen vor)
4
4. Blättchen unterseits behaart
7
— Blättchen völlig kahl
5
5. Kelchzipfel ungeteilt, höchstens die äußeren etwas gezähnt;
Blättch. schwach keilf., wie die Zweige blau bereift und rötl.
überlaufen; Blkr. klein, rosa; Fr. langgestielt, kugelig. 7. Alpen,
Schwarzwald, Vogesen, auch oft angepfl.
Rotblättrige R., R. rubrifólia Villars
— Kelchzipfel fiederspalt.
6
6. Bltnstiele länger als die Deckblätt.; Kelchzipfel zurückgeschlagen,
vor der Frreife abfallend; Blkr. hellrosa, seltener weiß. Sehr
veränderlich. 6. Waldränder, Hecken, gemein
Hundsrose, R. canína L.
— Bltnstiele kürzer als die Deckblätt.; Kelchzipfel aufrecht, erst bei
der Frreife abfallend; Griffel in einem weißwolligen Köpfchen. 6.
Wegränder, Abhänge, zerstr.
Blaugrüne R., R. glauca Villars
7. (4.) Griffel dicht weißwollig; Bltn in den breit. Deckblätt. versteckt;
Kelchbl. abstehend bis aufrecht, spät abfallend; Fr. bereift. 6.
Zerstr.
Lederblättrige R., R. corlifólia Fries
— Griffel schwach behaart od. kahl; Bltnstiele wenigstens doppelt so
lang als die Deckblätt.; Kelchblätt. zurückgeschlagen, frühzeitig
abfallend. 6. Verbreitet
Hecken-R., R. dumetórum Thuillier
8. (3.) Bltnstiele mit gestielten Drüsen besetzt
12
— Bltnstiele kahl, selten spärlich drüsig
9
9. Blättch. unterseits auf d. Nerven wenigdrüsig, klein, rundl. od.
eif., a. Grunde abgerund., dopp. gesägt, m. breit. drüsentragend.
Zähnen; Griffel wollig; Fr. klein, fast kugelig. 6. Im mittl. u. südl.
Gebiet, zerstr.
Flaum-R., R. tomentélla Leman
— Blättch. unterseits reichdrüsig, verkehrt-eif. bis lanzettl., am
Grunde mehr oder weniger keilförmig, mit schmalen, spitzen
Zähnen
10
10. Griffel verlängert, kahl oder wenig behaart; Kelchzipfel sehr
schmal, später zurückgeschlagen, früh abfallend; Bltnstiele länger
als die Fr.; Blkr. weißlich; Äste verlängert, dünn. 6. Wie vor.
Acker-R., R. agréstis Savi
— Griffel in einem kurzen, meist wolligen Köpfchen; Bltnstiele kurz,
höchstens so lang als die Fr. Gedrungene Sträucher mit
dichtstehenden Zweigen
11
11. Kelchzipfel zurückgeschlagen; Blättch. eif.-längl., am Grunde
schwach keilig, oberseits oft mit größeren, leicht abfallend.,
unterseits mit staubart. feinen Drüsen; Blkr. klein, lebhaft rosa. 6.
Selten
Nelken-R., R. caryophyllácea Besser
— Kelchzipfel aufgerichtet; Blättch. verkehrt-eif., von der Mitte an
scharf gesägt, unterseits mit kurz gestielten Drüsen; Blkr.
weißlich oder blaßrosa. 6. Süd- und Mitteldeutschl. bis Thüringen
und Schlesien. (R. gravéolens Grénier)
Elliptische R., R. ellíptica Tausch
12. (8.) Stacheln meist kräftig, vom Grunde an sichelförmig
gekrümmt; Blättch. klein, starkriechend
16
— Stacheln gerade od. leicht gekrümmt, lang; Blättch. ziemlich groß
13
13. Kelchblätt. nach der Blütezeit zurückgeschlagen, abfällig;
Blättch. kahl, starr, lebhaft grün, unterseits auf den starken
Nerven drüsig; Blkr. groß, lebhaft rosa. 6. Im südl. und mittl.
Gebiet zerstr. (R. jundzíllii Besser)
Rauhblättr. R., R. trachyphýlla Rau
— Kelchblätt. nach der Blütezeit aufgerichtet od. abstehend, meist
bleibend; Blättch. beiderseits behaart, graugrün
14
14. Stacheln schwach gebogen; Blkr. blaßrosa; Kelchblätt. vor der
Frreife abfallend; Blättch. grob doppelt gesägt, unterseits
graufilzig; Fr. aufrecht. (Ändert ab: Blättch. 3fach drüsig gezähnt,
weißgraufilzig, unterseits reichdrüsig; Kelch lange bleibend = R. venústa
Scheutz) 6. Verbreitet
Filz-R., R. tomentósa Smith
— Stacheln völlig gerade; Bltn lebhaft rosa; Fr. nickend
15
15. Fr. groß, kugelig, weichstachelig; Blättch. groß, unterseits filzig.
6. Der Fr. wegen oft angepfl.
Apfel-R., R. pomífera Herrmann
— Fr. kleiner, nicht weichstachelig; Blättch. kleiner, dicht
weichhaarig. 6. 7. Selten
Weiche R., R. mollis Smith
16. (12.) Griffel wollig; Kelchzipfel aufrecht od. abstehend; Bltnstiele
kurz; Bltn lebhaft rosa. 6. 7. Verbreitet
Wein-R., R. rubiginósa L.
— Griffel kahl; Kelchzipfel zurückgeschlagen; Bltnstiele länger als die
Fr.; Blkr. hell fleischrot. 6. 7. Selten (Schlesien, Thüringen,
Rheinprovinz)
Kleinblütige R., R. micrántha Smith
17. (2.) Äste verlängert, niederliegend; Blättch. dünn, eif. oder
elliptisch; Kelchzipfel schwach fiedersp. od. ungeteilt; Blkr. weiß.
6. Im südl. Gebiet. (R. repens Scopoli)
Feld-R., R. arvénsis Hudson
— Hochwüchsiger Strauch mit hängend. Ästen; Blättch. längl.-eif.,
oberseits glänzend; Blkr. klein, weiß, rosa überlaufen. 6. 7.
Westfalen, Baden.
Verwachsengriffelige R., R. stylósa Desvaux
18. (1.) Bltn gelb; Fr. scharlachrot. 6. Angepfl. und verw.
Gelbe R., R. lútea Miller
— Bltn rot od. weiß
19
19. Kelchzipfel fiedersp.; Blättch. lederig, sehr groß, zu 3–5; Blkr.
sehr groß, tiefrot. 6. Im südl. Gebiet bis Thüringen
Essigrose, R. gállica L.
Eine Abart davon ist vielleicht die in den Gärten kultivierte R. centifólia L., mit sehr großen,
krautigen Blätt., die nebst dem Bltnstande reichlich mit Drüsen besetzt sind. Bei einer Form
(R. muscósa, Moosrose) finden sich am Bltnstiel und Kelch moosartige Wucherungen.
— Kelchzipfel nicht fiedersp., ungeteilt
20
20. Blättch. mittelgroß, zu 5–7, unterseits weichhaarig; Nebenblätt.
der nichtblühend. Zweige fast röhrig eingerollt; Kelch bleibend. 5.
6. Süd- und Mitteldeutschl., selten
Zimt-R., R. cinnamómea L.
— Blättch. klein, zu 7–10 (meist 9), meist kahl; Nebenblätt. alle flach
21
21. Blättch. einfach gesägt; Kelchzipfel ½ so lang als die weiße
Blkr.; Fr. aufrecht. 6. 7. Sonnige Hügel, sehr zerstr.
Bibernell-R., R. pimpinellifólia L.
— Blättch. doppelt gesägt; Kelchzipfel länger als die rote Blkr.; Fr.
hängend. 6. 7. Gebirgswälder, selten
Alpen-R., R. alpína Miller
55. Familie. Papilionáceae, Schmetterlingsblütler.
1. Stengel krautig
12
— Stengel holzig
2
2. Blätt. einfach od. 3- bis mehrzählig gefingert
7
— Blätt. gefied.
3
3. Blätt. paarig gefied.; Bltn gelb
Caragána 204
— Blätt. unpaarig gefied.
4
4. Flügel u. Schiffchen fehlend; Fahne dunkelviolett
Amórpha 204
— Flügel und Schiffchen vorhanden; Bltn weiß, rot od. gelb
5
5. Blblätt. mit einem weit aus dem Kelche hervorragenden Stiel,
gelb; Hülsen fast stielrund, an den Gelenken eingeschnürt (Fig.
523)
Coronílla 205
— Blblätt. nicht lang gestielt; Bltn in Trauben
6
6. Bltn gelb; Hülse stark aufgeblasen
Colútea 204
— Bltn weiß od. rot; Hülse flach zusammengedrückt
Robínia 205
7. (2.) Blkr. gelb
9
— Blkr. weiß od. rosa; Stengel nur unten holzig
8
8. Bltn in doldenf. Köpfchen an der Spitze des Stengels, weiß;
Schiffchen schwarzviolett
Dorýcnium 204
— Bltn zu 1–2 blattachselst., rosa, selten weiß; Stengel meist dornig
Onónis 199
9. Blätt. nadelf., stechend; Blkr. kaum länger als der bis auf den
Grund 2teilige Kelch. Strauch mit langen Dornen (Fig. 509)
Ulex 198
— Blätt. nicht nadelf.; Blkr. deutl. länger als der Kelch
10
10. Blätt. alle einfach. Kleiner Strauch mit kurzen Dornen od.
dornenlos
Genísta 198
— Blätt. (wenigstens die unteren) 3zählig
11
11. Griffel sehr lang, kreisf. eingerollt; Bltn groß, einzeln; Hülse an
den Nähten zottig; Zweige rutenf., kantig, grün. Besenginster
Sarothámnus 198
— Griffel nicht spiralig eingerollt; Bltn in Trauben, in Köpfchen od. zu
zweien
Cýtisus 199
12. (1.) Blätt. gefiedert
26
— Blätt. einfach od. 3- bis mehrzählig gefingert
13
13. Bltn einzeln od. zu zweien auf langen Stielen
24
— Die einzelnen Bltn sitzend od. kurzgestielt, oft zu mehreren
gehäuft
14
Fig. 509.
14. Alle Blätt. einfach; Stengel platt, breit geflügelt
Genísta 198
— Blätt. in ihrer Mehrzahl 3–9zählig gefingert
15
15. Bltn einzeln od. zu zweien in den Blattachseln, im oberen Teile
des Stengels zuw. gedrängt
23
— Bltn in Köpfchen, Dolden (Fig. 510) od. Trauben (Fig. 512)
16
Fig. 510.
16. Blättch. groß (5–7 cm br.); Schiffchen nebst Stbblätt. und Griffel
spiralig eingerollt. Bohne
Phaséolus 210
— Blättch. viel kleiner; Schiffchen nicht spiralig eingerollt
17
17. Die am Grunde des Blattstiels entspringend. Nebenblätt. den
Fiederblättchen gleichgestaltet, so daß dadurch das 3zählige Blatt
5zählig od. gefied. erscheint (Fig. 513–514)
22
— Nebenblätt. viel kleiner als die Fiederblättch., diesen nicht
gleichgestaltet (vergl. Fig. 544)
18
18. Blätt. 4–9zählig gefingert
21
— Blätt. 3zählig gefingert
19
19. Blblätt. mit den Stbblätt. und oft auch unter sich verwachsen,
zuw. kürzer als der Kelch; reife Fr. kürzer od. wenig länger als der
Kelch, von der verwelkten Blkr. eingehüllt (Fig. 511); Bltn in
rundl. od. längl. Köpfchen.
Klee, Trifólium 201
Fig. 511.
— Blblätt. weder unter sich, noch mit den Stbblätt. verwachsen,
stets länger als der Kelch; reife Fr. aus dem Kelche hervorragend,
von der abfallend. Blüte nicht eingehüllt
20
20. Fr. gerade od. schwach gebogen, eif. bis kugelig (Fig. 512); Bltn
in lockeren, verlängerten Trauben (nur bei einer starkriechend. Pfl. in
blauen Köpfchen), hängend
Melilótus 201
Fig. 512.
— Fr. nierenf., sichelf. od. schneckenf. eingerollt, zuw. dornig (Fig.
530–533); Bltn in dichten, oft kopff. Trauben, aufrecht
Medicágo 200
21. (18.) Bltn in Quirlen od. Trauben; Blätt. meist 7–9zählig
gefingert
Lupínus 199
— Bltn in Köpfchen; Blätt. 4–5zählig
Trifólium 201
22. (17.) Bltn gelb; Schiffchen zugespitzt; Blättch. meist eif. (Fig.
513)
Lotus 204
Fig. 513.
— Bltn weiß, mit violetter Schiffchenspitze; Blättch. linealisch (Fig.
514)
Dorýcnium 204
Fig. 514.
23. (15.) Pfl. starkriechend; Bltn gelblichweiß; Blätt. alle 3zählig
Trigonélla 201
— Pfl. nicht starkriechend; Bltn rosa, selten weiß od. goldgelb;
Schiffchen zugespitzt; Blätt. z. T. einfach
Onónis 199
24. (13.) Blätt. alle einfach, nicht 3zählig
Láthyrus 209
— Blätt. alle 3zählig
25
25. Hülse mit 4 geflügelten Kanten, gerade (Fig. 515); Bltn
ansehnlich
Tetragonólobus 204
Fig. 515.
— Hülse spiralig gewunden; Bltn klein
Medicágo 200
26. (12.) Blätt. paarig gefied. (ohne Endblättch.)
37
— Blätt. unpaarig gefied. (mit Endblättch.)
27
Fig. 516.
27. Untere Blätt. meist ungeteilt; Endblättch. der gefied. Blätt. oft
viel größer als die übrigen Blättch.; Bltn goldgelb, selten rötlich,
in Köpfchen mit fingerf. geteilten Deckblätt. (Fig. 516)
Anthýllis 204
— Alle Blätt. gefied., mit ziemlich gleichen Blättch.; Bltn doldig od.
traubig, ohne fingerf. geteilte Deckblätt.
28
28. Bltn in Dolden (die Dolde zuw. nur 2blütig)
34
— Bltn in Trauben
29
29. Alle Stbfäden verwachsen (Fig. 517); Bltn lila od. weiß; Fr.
stielrund, wie die ganze Pfl. kahl; Nebenblätt. halb pfeilf.-
lanzettlich, lang stachelspitzig. H. ½-1 m. Gartenpfl., selten wild
Galéga 204
Fig. 517.
— Hinteres Stbblatt ganz frei, nicht mit den übrigen verwachsen
(Fig. 518)
30
Fig. 518.
30. Bltn gelb od. gelblich
33
— Bltn rot od. bläulich, selten weiß
31
31. Hülse der Länge nach mehr od. weniger 2fäch., an einer Naht
eingedrückt; Bltn violett, fleischrot od. weiß
Astrágalus 205
— Hülse einfach; Schiffchen länger als die Flügel
32
32. Bltn rosa; Hülse 1samig, rundl. (Fig. 519), reif knochenhart. Als
Futterpfl. gebaut
Onóbrychis 206
Fig. 519.
— Bltn purpurn; Hülse zwischen den Samen eingeschnürt, quer in
Glieder zerfallend (Fig. 520). Riesengebirge, Alpen
Hedýsarum 206
Fig. 520.
33. (30.) Schiffchen am Ende mit einer gerad. Spitze (Fig. 521); Pfl.
rauh behaart
Oxýtropis 205
Fig.
521.
— Schiffchen am Ende stumpf; Pfl. kahl od. mit angedrückten
Haaren, selten abstehend behaart und dann alle Blätt. grundst.
Astrágalus 205
34. (28.) Blätt. aus 5 Teilblättch. zusammengesetzt
22
— Blätt. aus 7 und mehr Teilblättch. zusammengesetzt
35
35. Stiel der Blblätt. viel länger als der Kelch; Bltn goldgelb; Hülsen
zusammengedrückt, mit hufeisenf. gekrümmten Gliedern (Fig.
522)
Hippocrépis 206
Fig. 522.
— Stiel der Blblätt. so lang od. kürzer als der Kelch, selten länger
und dann die Bltn nicht gelb
36
Fig.
523.
36. Bltn goldgelb od. weiß, mit roter Fahne; Hülsen 4flügelig od.
4kantig (Fig. 523)
Coronílla 205
— Bltn rötlichgelb od. Fahne und Flügel schwach rosa; Dolde 2–
8blütig; Hülsen vogelklauenähnlich (Fig. 524)
Ornithopus 206
Fig. 524.
37. (26.) Stbfadenröhre rechtwinkl. abgeschnitten; die freien oberen
Enden der Stbblätter daher gleich lang (Fig. 525)
39
Fig. 525.
— Stbfadenröhre schief abgeschnitten, daher die freien oberen
Enden der Stbblätt. verschieden lang (Fig. 526)
38
Fig. 526.
38. Griffel flach, auf der inneren (Fahnen-) Seite behaart; Bltn
bläulichweiß, in 1–3blütig., langgestielten Trauben; Kelch sehr tief
geteilt; Hülse fast rautenf. (Fig. 527), kahl, meist 2samig. Linse
Lens 209
Fig. 527.
— Griffel fadenf., entweder unter der Spitze ringsum behaart od. an
der Schiffchenseite bärtig
Vícia 206
39. Griffel zu einer nach unten offenen Rinne zusammengebogen,
auf der inneren Seite bärtig; Nebenblätt. sehr groß, meist größer
als die Blättch. Nur angebaut. Erbse
Pisum 209
— Griffel flach, auf der ob. Seite mit einer Haarlinie (zuweilen nebst
Stbblätt. und Schiffchen um seine Achse gedreht und dann die
Flächen nach den Seiten gerichtet); Stengel zuweilen breit
geflügelt
Láthyrus 209
1. Ulex L., Gaspeldorn. XVII.
Sandige Orte, im nördl. und westl. Gebiet zerstr. 5. 6.
U. europǣus L.
2. Genísta L., Ginster. XVII.
1. Stengel breit geflügelt, gegliedert; Blüten in kopff. Trauben. 5. 6.
Trockene Wiesen, sehr zerstr., im nördl. Gebiet fehlend (Cytisus
sagittális Koch)
Geflügelter G., G. sagittális L.
— Stengel nicht geflügelt
2
2. Stengel ohne Dornen
4
— Stengel wenigstens unterwärts mit Dornen
3
3. Junge Triebe wie die Hülsen kahl; Deckblättch. eif., länger als die
Bltnstiele; Blätt. blaugrün. 5. 6. Heiden, Nordwestdeutschl., sonst
selten
Englischer G., G. ánglica L.
— Junge Triebe wie die Hülsen rauhhaarig; Deckblättch. pfrieml.,
etwa ½ so lang als die Bltnstiele; Blätt. grasgrün. 5. 6. Trockene
Wälder, nicht selten
Deutscher G., G. germánica L.
4. Bltn einzeln oder zu 2, blattachselst.; Fahne, Schiffchen und Fr.
seidenhaarig; Stengel liegend. 4–6. Dürre Triften, Heiden,
stellenweise
Behaarter G., G. pilósa L.
— Bltn in endst. Trauben; Blblätt. und Fr. kahl; Stengel aufrecht od.
aufsteigend. 6. 7. Trockene Wiesen, Triften, Wälder
Färber-G., G. tinctória L.
3. Sarothámnus Wimmer, Besenginster. XVII.
Wegränder, lichte Wälder, Abhänge, verbreitet. 5. 6.
S. scopárius Wimmer
4. Cýtisus L., Goldregen, Geißklee. XVII.
1. Bltn in endst., kopff. Dolden oder zu 1–4 (meist 2)blattachselst.
(an den Ästen traubenart. gehäuft)
5
— Bltn in unbeblätt. Trauben
2
2. Trauben aufrecht, endst.; Bltn goldgelb
4
— Trauben hängend, seitenst.
3
3. Hülsen seidenhaarig; Blättch. oberseits kahl, unterseits behaart;
Bltn goldgelb. 5. 6. Häufig angepfl.
Goldregen, C. labúrnum L.
— Hülsen kahl; Blätt. am Rande gewimpert, sonst kahl; Bltn
hochgelb. 5. 6. Bisweilen angepfl.
Alpen-G., C. alpínus Miller
4. Blätt. alle deutlich gestielt, unterseits nebst den Blattstielen und
Hülsen angedrückt behaart; Traube reichblütig; Äste rutenf. 6–8.
Beim Trocknen schwarz werdend. Steinige, trockene Orte, selten,
zuweilen als Zierstrauch angepflanzt
Schwarzer G., C. nígricans L.
— Obere Blätt. sitzend; Bltnstiele, Hülsen und Blätt. kahl; Traube 4–
8blütig. Nicht schwarz werdend. 5. 6. In Anlagen
Italienischer G., C. sessilifólius L.
5. Bltn in kopff. Dolden, daneben auch einzeln stehende Bltn; Äste
aufrecht abstehend; alle Teile der Pfl. rauhhaarig. 6–8. Lichte
Wälder, Gesträuch, sonnige Orte, selten, auch angepfl. und verw.
Kopfiger G., C. capitátus Jacquin
— Bltn meist zu 2, blattachselst.; Äste lang, niederliegend; Blätt.
unterseits nebst den Kelchen und Bltnstielen angedrückt
seidenhaarig. 5. 6. Lichte Wälder, Gesträuch, sonnige Hügel, im
südl. und östl. Deutschl.
Zwillings-G., C. ratisbonénsis Schäffer
5. Lupínus L., Lupine. XVII.
1. Bltn gelb, in traubig angeordneten Quirlen. 6–9. Angebaut
Gelbe L., L. lúteus L.
— Bltn blau od. weiß, in endst. Trauben
2
2. Bltn blau; Blättch. linealisch. 6–9. Wie vor.
Blaue L., L. angustifólius L.
— Bltn weiß; Blättch. verkehrt-eif.-längl. 6–9. Seltener gebaut
Weiße L., L. albus L.
6. Onónis L., Hauhechel. XVII.
1. Hülsen so lang od. länger als der Kelch; Stengel 1- od. 2reihig
behaart, meist stark dornig; Dornen oft zu 2. 6–9. Triften,
Wiesen, Wege, meist häufig
Dornige H., O. spinósa L.
— Hülsen kürzer als der Kelch; Stengel ringsum behaart; Blätt.
drüsig
2
Fig.
528.
2. Stengel ausgebreitet, dornenlos od. zerstr. dornig; Blättch. vorn
abgerundet (Fig. 528); Bltn entfernt, meist einzeln. 6–9. Sandige
Triften, Wegränder, trockene Wiesen
Kriechende H., O. repens L.
— Stengel aufrecht oder aufstrebend, stets dornenlos; Blättch. mehr
od. weniger spitz (Fig. 529); Bltn zu 2, an den Enden der Äste
traubig gehäuft; Fahne stumpf. 7. 8. Wie vor. Im östl. Deutschl.
Stinkende H., O. arvénsis L.
Die gelbblühende O. natrix Lamarck kommt im Gebiete nur bei Gorze unweit Metz vor.
Fig. 529.
7. Medicágo L., Schneckenklee. XVII.
1. Bltn blau od. violett; Hülsen mit 2–3, im Mittelpunkte offenen
Windungen (Fig. 530). 6–9. Gebaut und verwild.
Luzerne, M. satíva L.
Fig. 530.
M. falcata × satíva (M. média Persoon) hat anfangs gelbe, dann grüne, später violette
od. bläul. Bltn; Hülsen mit ½-2½ Windungen.
— Bltn gelb
2
2. Köpfchen reichblütig; Hülsen sichelf. od. mit einer einzig.
Windung, ring- od. nierenf., dornenlos
6
— Köpfchen 1–8blütig; Hülsen schneckenf., mit 2–6 Windungen,
dornig (Fig. 531)
3
Fig. 531.
3. Windungen der Hülsen 5–10 mm im Durchmesser; Samen durch
Scheidewände getrennt
5
— Windungen der Hülsen 3–4 mm im Durchmesser; Samen durch
Scheidewände nicht getrennt
4
4. Traube 1–8blütig; Kelchzähne so lang als die Kelchröhre;
Nebenblätt. ganzrand. od. am Grunde gezähnelt; Hülsen mit 4–5
Windungen, die kaum sichtbar geadert sind; Stacheln hakig. 5–7.
Trockene Hügel, stellenweise, in Nordwestdeutschl. und
Ostpreußen fehlend
Kleinster Sch., M. mínima Bartalini
— Traube 1–2blütig; Kelchzähne kürzer als die Kelchröhre;
Nebenblätt. gezähnt; Hülsen mit 3–5 deutlich geaderten
Windungen. 6. 7. Zuweilen eingeschleppt und verw.
Ascherson's-Sch., M. aschersoniána Urban
5. Blättchen meist gefleckt; Traube 1–5blütig; Flügel kürzer als das
Schiffchen; Stengel von gegliederten Haaren etwas rauh. 5. 6.
Eingeschleppt und in der Nähe von Fabriken verw.
Arabischer Sch., M. arábica Allioni
— Blättch. ungefleckt; Traube 7–8blütig; Flügel länger als das
Schiffchen; Steng. kahl od. mit einfachen Haaren besetzt. 5–8.
Äcker, Schutt. Eingeschleppt.
Rauher Sch., M. híspida Gærtner
M. rigídula Desrousseaux, mit beiderseits behaarten Blättch. und filzigen Hülsen, findet
sich hier und da nebst einigen anderen Arten eingeschleppt.
Fig. 532.
6. Bltn bis 1 cm groß; Hülsen sichel- od. ringf. gekrümmt (Fig. 532),
etwa 1 cm lang. 6–9. Wege, Hügel, zerstr.
Sichelklee, M. falcáta L.
— Bltn bis 3 mm groß; Hülsen nierenf., in der Mitte ohne Lücke (Fig.
533), etwa 2 mm lang. 6–9. Wiesen, Grasplätze, häufig
Hopfenklee, M. lupulina L.
Fig. 533.
8. Trigonélla L., Bockshornklee. XVII.
Hülsen 8–15 cm lang, etwas gebogen. 6. 7. Selten gebaut und
verwildert
T. foenum graecum L.
9. Melilótus Lamarck, Steinklee. XVII.
1. Bltn gelb
3
— Bltn blau od. weiß
2
2. Bltn in lockeren Trauben, weiß; Bltnstielchen ½ so lang als der
Kelch; Flügel kürzer als die Fahne. 7–9. Unbebaute Orte
Weißer St., M. albus Desrousseaux
Bei dem hier und da eingeschleppten M. ruthénicus M. B. sind die Bltnstielchen länger als
der Kelch und die Flügel fast so lang als die Fahne.
— Bltn in rundl. Köpfchen, blau. 6. 7. Gebaut u. verw.
Schabziegerklee, M. cœrúleus Desrousseaux
3. Nebenblätt. ganzrandig. Pfl. mit starkem Geruch
5
— Nebenblätt. am Grunde breiter und hier gezähnt (Fig. 534)
4
Fig. 534.
4. Flügel länger als das Schiffchen; Hülsen eif., spitzlich. 5–9.
Salzhaltige Orte, sehr zerstr.
Gezähnter St., M. dentátus Persoon
— Flügel so lang als das Schiffchen; Bltn sehr klein; Hülsen fast
kugelig, sehr stumpf; Nebenblätt. mitunter ganzrandig. 6. 7.
Zuweilen eingeschleppt.
Kleinblütiger St., M. parviflórus Desfontaines

Hands-on GitHub Actions 1st Edition Chaminda Chandrasekara

  • 1.
    Hands-on GitHub Actions1st Edition Chaminda Chandrasekara install download https://ebookmeta.com/product/hands-on-github-actions-1st- edition-chaminda-chandrasekara/ Download more ebook from https://ebookmeta.com
  • 2.
    We believe theseproducts will be a great fit for you. Click the link to download now, or visit ebookmeta.com to discover even more! Hands-On Functional Test Automation: With Visual Studio 2017 and Selenium 1st Edition Chaminda Chandrasekara https://ebookmeta.com/product/hands-on-functional-test- automation-with-visual-studio-2017-and-selenium-1st-edition- chaminda-chandrasekara/ Hands-on Azure Repos: Understanding Centralized and Distributed Version Control in Azure DevOps Services 1st Edition Chaminda Chandrasekara https://ebookmeta.com/product/hands-on-azure-repos-understanding- centralized-and-distributed-version-control-in-azure-devops- services-1st-edition-chaminda-chandrasekara-2/ Hands-on Azure Repos: Understanding Centralized and Distributed Version Control in Azure DevOps Services 1st Edition Chaminda Chandrasekara https://ebookmeta.com/product/hands-on-azure-repos-understanding- centralized-and-distributed-version-control-in-azure-devops- services-1st-edition-chaminda-chandrasekara/ Francophone Literature as World Literature Christian Moraru https://ebookmeta.com/product/francophone-literature-as-world- literature-christian-moraru/
  • 3.
    Sociology For Physiotherapistsand Nurses Dibyendunarayan Bid https://ebookmeta.com/product/sociology-for-physiotherapists-and- nurses-dibyendunarayan-bid/ Empire of Lies Torrio Empire Book 2 A Dark Mafia Romance J L Beck https://ebookmeta.com/product/empire-of-lies-torrio-empire- book-2-a-dark-mafia-romance-j-l-beck/ Changing Trends in Human Thoughts and Perspectives Science Humanities and Culture 1st Edition Jogamaya Devi College https://ebookmeta.com/product/changing-trends-in-human-thoughts- and-perspectives-science-humanities-and-culture-1st-edition- jogamaya-devi-college/ Distributed Systems with Node js 1st Edition Thomas Hunter Ii https://ebookmeta.com/product/distributed-systems-with-node- js-1st-edition-thomas-hunter-ii-2/ A B A B A A Book of Pattern Play Brian P. Cleary https://ebookmeta.com/product/a-b-a-b-a-a-book-of-pattern-play- brian-p-cleary/
  • 4.
    Ship Got RealLove at Sea 1st Edition T L Anderson https://ebookmeta.com/product/ship-got-real-love-at-sea-1st- edition-t-l-anderson/
  • 6.
    Chaminda Chandrasekara andPushpa Herath Hands-on GitHub Actions Implement CI/CD with GitHub Action Workflows for Your Applications 1st ed.
  • 7.
    Chaminda Chandrasekara Dedigamuwa, SriLanka Pushpa Herath Hanguranketha, Sri Lanka Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.​ apress.​ com/​ 978-1-4842-6463-8. For more detailed information, please visit http://​ www.​ apress.​ com/​ source-code. ISBN 978-1-4842-6463-8 e-ISBN 978-1-4842-6464-5 https://doi.org/10.1007/978-1-4842-6464-5 © Chaminda Chandrasekara and Pushpa Herath 2021 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and
  • 8.
    accurate at thedate of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Distributed to the book trade worldwide by Springer Science+Business Media LLC, 1 New York Plaza, Suite 4600, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
  • 9.
    May this bookhelp all the developers who are starting to use GitHub Actions.
  • 10.
    Introduction GitHub is themost widely used source code repository provider. It is embraced by the open source community and by many software development companies. Today, source code is essentially required to have continuous integration and continuous delivery/deployments (CI/CD) to target environments because automation has become a norm in software development practices and includes the wide adoption of agility. GitHub repositories can be integrated with third-party CI/CD integration tools, such as Jenkins or Azure DevOps. Since Microsoft’s acquisition, GitHub repos are now closely integrated with Azure DevOps. However, bringing all GitHub customers to use Azure DevOps is a tough ask, considering the wide adoption of GitHub by open source and non-Microsoft software development technology users. GitHub Actions facilitate a state-of-the-art CI/CD workflow platform inside GitHub. The actions provide options to implement build and deployment workflows within GitHub. GitHub Actions enable pull request validation to enhance repository branch stability to the next level by assuring the code compilation state with each merge. This hands-on book was written as a day-to-day reference for developers and Ops teams to build quality CI/CD workflows. The book offers in-depth lessons on implementation patterns, solutions for different technology builds, guidelines for implementing custom components as actions, and descriptions of the features available with GitHub Actions workflows to set up CI/CD for your repositories. The book consists of sample code in each lesson to guide you through getting started with GitHub Actions workflows in your web or mobile applications, targeting any platform and any language. In addition to using GitHub-hosted machines (runners) to run the workflows, the book guides you through setting up your machines as runners for GitHub Actions. A detailed exploration of the available actions, syntax usage reference guides, and custom action
  • 11.
    implementation for yourspecific needs provide all the essentials you need to implement GitHub Actions workflows for your GitHub repositories.
  • 12.
    Acknowledgments We are thankfulto all the mentors who have encouraged and helped us during our careers and who have provided us with so many opportunities to gain the maturity and the courage needed to write this book. We would also like to thank our friends and colleagues who have helped and encouraged us in so many ways. Last, but in no way least, we owe a huge debt to our families, not only because they have put up with late-night typing, research, and our permanent air of distraction, but also because they have had the grace to read what we have written. Our heartfelt gratitude is offered to them for helping us make this dream come true.
  • 13.
    Table of Contents Chapter1:​Introduction to GitHub Actions Continuous Integration and Continuous Delivery Importance of Software Delivery Automation Introduction to GitHub Actions Action Artifacts Event GitHub-Hosted Runners Job Self-Hosted Runner Step Workflow Summary Chapter 2:​Getting Started with GitHub Actions Workflows Using Preconfigured Workflow Templates Using Marketplace Actions to Create Workflows Understanding the Structure of a Workflow Setting up Continuous Integration Using GitHub Actions Building a .​ NET Core Web App with GitHub Actions Summary Chapter 3:​Variables Defining and Using Variables Variables in the Entire Workflow Scope
  • 14.
    Variables in JobScope Variables in Step Scope Using the set-env Command Default Variables Naming Considerations for Variables GITHUB_​Prefix Case Sensitivity _​ PATH Suffix Special Characters Summary Chapter 4:​Secrets and Tokens Defining and Using Secrets Repo-Level Secrets Organization-Level Secrets Naming Secrets Using Secrets in Workflows Limitations with Secrets GITHUB_​ TOKEN Summary Chapter 5:​Artifacts and Caching Dependencies Storing Content in Artifacts 5.​ 02:​Cashing Workflow Dependencies Summary Chapter 6:​Using Self-Hosted Runners Setting up a Windows Self-Hosted Runner
  • 15.
    Setting up aLinux Self-Hosted Runner Summary Chapter 7:​Package Management Creating a NuGet Package with dotnet pack Creating a NuGet Package Using a nuspec File Using Packages in GitHub Packages Summary Chapter 8:​Service Containers Service Containers and Job Communication Job Running as a Container Jobs Running Directly on a Runner Machine Using a Redis Service Container Run a Workflow Job as a Container in the Runner Run a Workflow Job Directly in the Runner Summary Chapter 9:​Creating Custom Actions Types of Actions Creating Custom Actions JavaScript Custom Action Composite Run Steps Action Docker Container Action Publishing Custom Actions Summary Chapter 10:​A Few Tips and a Mobile Build Example Variable Usage Differences
  • 16.
    Default Variables with$variablename Syntax Using Variables in PowerShell Core in Action Steps Workflow Job Status Check Android Build and Push to MS App Center for Distribution Summary Index
  • 17.
  • 19.
    is a MicrosoftMost Valuable Professional (MVP) for Visual Studio ALM and Scrum Alliance Certified ScrumMaster. He focuses on and believes in continuous improvement of the software development life cycle. He is the Cloud Development and DevOps Architect at eKriegers (Pvt) Ltd. Chaminda is an active Microsoft Community Contributor (MCC) who is well recognized for his contributions in Microsoft forums, TechNet galleries, wikis, and Stack Overflow. He contributes extensions to Azure DevOps Server and Services (former VSTS/TFS) in the Microsoft Visual Studio Marketplace. He also contributes to other open source projects on GitHub. Chaminda has published six books with Apress. Pushpa Herath
  • 21.
    is a MicrosoftMost Valuable Professional (MVP) working as a Senior DevOps Engineer at 99x. She has many years of experience in Azure DevOps Server and Services (formerly VSTS/TFS), the Azure cloud platform, and QA automation. She is an expert in DevOps, currently leading the Sri Lanka DevOps community. Pushpa has in-depth knowledge of the Azure cloud platform tools in her community activities. She has published four books with Apress and speaks at community events on her Sri Lanka DevOps community’s YouTube channel. Pushpa blogs on technology at DevOps Adventure.
  • 22.
    About the TechnicalReviewer Mittal Mehta
  • 24.
    has 18 yearsof IT experience. He is a DevOps architect and a Microsoft Certified Professional with development experience in TFS, C#, ASP.​ net, Navision, and Azure DevOps. He has worked with Microsoft automation, configuration, and DevOps processes for the past ten years.
  • 25.
    © The Author(s),under exclusive license to APress Media, LLC, part of Springer Nature 2021 C. Chandrasekara, P. HerathHands-on GitHub Actions https://doi.org/10.1007/978-1-4842-6464-5_1 1. Introduction to GitHub Actions Chaminda Chandrasekara1 and Pushpa Herath2 (1) Dedigamuwa, Sri Lanka (2) Hanguranketha, Sri Lanka GitHub is the most widely embraced repository platform for software developers and open source communities. Large enterprises and individual developers use the GitHub platform to keep versioned source code. GitHub can be integrated with Azure Pipelines and other CI/CD (continuous integration and continuous deployment) tools to provide software delivery automation. Instead of using third-party integrations for GitHub repositories, you can now use GitHub Actions as workflows to implement CI/CD pipelines. This chapter briefly explores CI/CD to help you understand why software delivery automation is vital for software development teams to succeed and be competitive. It also introduces GitHub Actions’ basic concepts to prepare you for the upcoming chapters in the book. Continuous Integration and Continuous Delivery In software development, multiple team members develop code and contribute to creating the software’s functionality. When multiple people contribute to a code base, it is important to maintain its integrity and ensure that any team member can retrieve the latest version and build and run it locally.
  • 26.
    Two important aspectsshould be maintained to assure the code base's stability. The first aspect is to ensure that the code is compiling without errors. The second aspect is to ensure that all unit tests validating code behavior pass, including the latest code changes, at a very high percentage. A build pipeline should be defined to compile each check- in/commit to the code base and then execute all unit tests to validate the code base to ensure its stability; this is generally known as a CI build. If the build successfully compiles and all the unit tests pass, it generates and publishes output that is deployed to a target environment (see Figure 1-1). Figure 1-1 Continuous integration
  • 27.
    Checking for codesecurity vulnerabilities can be integrated into the build pipeline to improve a project/product’s security. The quality of the code can be validated in a build pipeline. Early detection of security vulnerabilities and code quality issues with a shift-left approach reduces costs in the long run because a vulnerability detected during production is costly to fix. Development teams produce software in short cycles in modern, agile software development approaches. One of the biggest challenges is ensuring a software release’s reliability in target environments. A straightforward and reusable deployment process is essential in reducing the cost, time, and risks of delivering software changes, including incremental updates to an application in production. In a nutshell, continuous delivery ensures that software changes are delivered more frequently and reliably. DevOps has evolved as a product of continuous delivery. Continuous delivery ensures that every change is deployed to production with the option to hold deployment until manual approval is given. Continuous deployment allows every change to be automatically deployed to production. To implement continuous deployment, you must have continuous delivery already in place. Continuous deployment is created by automating the approval steps in continuous delivery (see Figure 1-2).
  • 28.
    Figure 1-2 Continuousdelivery vs. deployment Importance of Software Delivery Automation Software delivery automation involves a few processes. Code compilation validation, code stability, quality, and security are covered in continuous integration. Integration and functional test automation verify that business needs are being met in software systems. Release or deployment automation delivers and manages deployment configurations automatically. Using infrastructure as code (IaC) and deploying infrastructure with automated pipelines offers a dynamic provisioning environment to a software team, essentially facilitating the agile process and enhancing the DevOps team’s capabilities. Without software process automation, deploying software would be a challenging task. An Ops team would need to spend a lot of time manually setting up and deploying new environments. There would be a higher possibility of missed steps during setup, leading to a variety of unexpected issues that cost time and money to resolve. Setting up and deploying environments requires additional investment in human resources (see Figure 1-3 (data from IBM System Science Institute Relative Cost of Fixing Defects research gate)).
  • 29.
    Figure 1-3 Costof bugs Skipping tests may result in bugs creeping into production, which would cost more money or cause client dissatisfaction and lead to legal action or harm your business reputation. And again, testing manually costs money and delays deliverables. There is a critical need for test automation to avoid additional costs and software delivery issues (see Figure 1-4 (data from https://qodestack.com/myths-of-test-automation/)).
  • 31.
    Figure 1-4 Automatedtesting vs. manual testing Automating deployment and testing processes while identifying security and other software vulnerabilities with a shift-left approach is vital. Detecting vulnerabilities as early as possible (on the left side of process flow if possible) costs less money than to fix them. Introduction to GitHub Actions GitHub Actions are a set of actions in a GitHub repository workflow. These actions allow you to customize and execute software development workflows. You can create actions or utilize existing actions and create and customize workflows to perform any job or automate software development life cycle processes, including CI/CD. Actions are individual tasks that can be combined to create a workflow. A workflow is one or more automated jobs with actions configured in a YAML file that can be stored in your GitHub repo. Let’s discuss each key concept in more detail. Action The smallest building block of a workflow is an action, which can be identified as an individual task. These tasks or steps can be combined to create a job that can be executed in a workflow. Existing actions from the marketplace can create jobs and workflows, and you can customize or create your own actions. An action must be used as a step in a job to be used in a workflow. You need to combine actions into a job to make up a workflow that can check out a repository, and build and publish artifacts. Artifacts The files generated when you build your software project or test your software project are artifacts. Artifacts may contain the binary packages required to deploy your software and any support files, such as configurations or infra-scripts required for deployment activities. Artifacts can be created in one job and used in another job for deployment actions in a workflow.
  • 32.
    Event An event triggersa workflow in GitHub Actions. Once a code change is pushed, or a pull request is made, an event can be set up in GitHub Actions to trigger the workflow. You can configure external triggers using a repository dispatch webhook. You can also use many other webhooks, such as deployment, workflow dispatch, and check runs. GitHub-Hosted Runners Hosted runners are machines similar to hosted agents in Azure DevOps pipelines. They are supported in Windows, Linux, and macOS. These machines are preinstalled with commonly used software. You cannot customize a hosted runner’s hardware configuration. A GitHub-hosted runner virtual environment contains hardware configuration, operating system, and installed software information. You can find installed software and OS information at https://github.com/actions/virtual- environments/tree/main/images. Job A job is a set of steps set up to run in a single runner. A job can comprise one or more actions. Jobs can run in parallel in a single workflow, and you can set up dependencies to run jobs sequentially. A dependent job will not run if the dependencies fail. Each job in a workflow runs in a fresh instance of a runner. A job should specify the runner’s OS and the version. Self-Hosted Runner You can set up a self-hosted runner on a virtual or physical machine and connect it to a GitHub repo to run your jobs. Self-hosted runners are useful when you have special hardware configurations or software requirements for building your applications or running your jobs. Self-hosted runners are discussed more in Chapter 6. Step
  • 33.
    A task thatis an action or a command is identified as a step. All steps in a job run in the same runner. The file system’s information is shared with multiple steps (actions and commands) in a single job. Workflow In a GitHub repo, the process set up in a YAML file defining the build, test, package, or deployment jobs is called a workflow. A workflow is scheduled to run based on triggers/events, similar to Azure DevOps builds and releases. A workflow may contain one or more jobs set up to run sequentially or in parallel, depending on the requirements. Workflow File The YAML file stored in the github/workflows/ folder in your GitHub repository is a workflow file. The workflow file is defined with the workflow, which runs based on the events. Workflow Run A workflow executes based on the preconfigured triggers/events. A workflow run is similar to a build or release pipeline run in Azure DevOps. Logs tell you about failed jobs or successful job activities. Each workflow runs logs for the jobs and actions or commands executed. Summary This chapter looked at CI/CD concepts and the importance of automation in the software delivery process. It explored a few important key concepts in GitHub Actions to set the stage for the rest of the chapters in this book. The next chapter starts using GitHub Actions by looking at preconfigured workflow templates and marketplace actions. You create a GitHub Actions workflow to build a .NET Core application. You learned about the structure of a workflow in this chapter and set up continuous integration with GitHub Actions in the next chapter.
  • 34.
    © The Author(s),under exclusive license to APress Media, LLC, part of Springer Nature 2021 C. Chandrasekara, P. HerathHands-on GitHub Actions https://doi.org/10.1007/978-1-4842-6464-5_2 2. Getting Started with GitHub Actions Workflows Chaminda Chandrasekara1 and Pushpa Herath2 (1) Dedigamuwa, Sri Lanka (2) Hanguranketha, Sri Lanka Automated deployment and delivery pipelines increase software development process efficiency, increase team productivity, and enhance the ability to deliver software rapidly without compromising quality. GitHub Actions workflow features allow users to configure various deployment and delivery pipelines to support different technologies. In this chapter, you learn about GitHub Actions workflows. We discuss the components that are important for configuring build and deployment pipelines. GitHub Actions workflows are configured using preconfigured workflow templates or Marketplace actions, which you learn to work with in this chapter. This chapter also explains GitHub Action workflows’ structure and continuous integration capabilities by using a sample .NET Core application pipeline. Using Preconfigured Workflow Templates A GitHub Actions workflow is a YAML file that consists of automated process instructions. It is made of jobs, events, steps, actions, and
  • 35.
    runners. Steps areidentified as the tasks executed by the job, which runs Actions and commands. One workflow can have one or multiple independent or dependent jobs. The workflow file needs a mechanism to configure automated triggers, and events automatically decide which activity triggers the workflow. A runner is a machine on which the GitHub Actions runner application is installed. Workflow jobs are executed using the runner provided in the workflow script. Today, the information technology industry uses more tools and technologies than ever before. Hence, more hosting platforms are available in the market that can be integrated with deployment tools. GitHub has multiple predefined workflow templates to create automated build and deployment processes. To find these workflow templates, go to the GitHub repository, and move to Actions. You can find continuous integration and deployment workflow templates on this page (see Figure 2-1).
  • 37.
    Figure 2-1 Workflowtemplates You see the deployment workflow templates for all the main cloud platforms, such as Azure, AWS, Google Cloud, and IBM Cloud. Clicking the “Set up this workflow” button opens a template workflow YAML file, which you can edit to fit your requirements (see Figure 2- 2). Figure 2-2 Workflow template YAML file
  • 38.
    In addition tocontinuous deployment workflow templates, there are continuous integration workflow templates to build applications using different technologies, such as Ruby, Java, .NET, Python, and more. Like the deployment workflow template, integration workflow is also a YAML file consisting of basic build steps that you can edit according to your requirements. The workflow template consists of all the basic sections required to set up a build pipeline or deployment pipeline. Using Marketplace Actions to Create Workflows A GitHub workflow is a collection of multiple components. Of all the components, an action is the smallest portable building block in the workflow. There are two types of GitHub Actions: publicly available actions (a.k.a. Marketplace actions) and self-defined actions. This section explains how to work with Marketplace actions. You can access Marketplace actions from two places; one is from the workflow editor. Since you have already learned about the workflow template, let’s add an action from the workflow editor page (see Figure 2-3).
  • 40.
    Figure 2-3 Marketplaceactions Select the action that needs to be added to the workflow. A YAML script is added to the workflow YAML file. For this example, let’s select Download a Build Artifact (see Figure 2-4).
  • 42.
    Figure 2-4 Marketplaceaction YAML script To install the Marketplace action in the workflow, copy the YAML script under the Installation section of the Marketplace action. Select the relevant action version before copying the YAML script. Paste the copied YAML action in the steps section of the workflow. Provide all the relevant details for the action. Understanding the Structure of a Workflow In this section, you learn about the structure of a workflow. To set up a workflow, go to Actions in your repo. You see a “set up a workflow yourself” link to start the workflow creation process without using templates (see Figure 2-5). Figure 2-5 Creating a workflow from scratch A YAML file opens with a basic workflow configuration structure. You can follow the YAML file structure to build the workflow according to your needs. Let’s discuss each section of the workflow. A manually created workflow template is set up as follows. # This is a basic workflow to help you get started with Actions
  • 43.
    name: CI # Controlswhen the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: push: branches: [ master ] pull_request: branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 # Runs a single command using the runners shell - name: Run a one-line script run: echo Hello, world! # Runs a set of commands using the runners shell - name: Run a multi-line script run: | echo Add other actions to build, echo test, and deploy your project.
  • 44.
    Workflow files shouldbe saved in github/workflows in the repository root. You can define the exact triggering condition for each workflow. You can set up event triggers, schedule triggers, and manual triggers. A workflow_dispatch event should be activated in your workflow to enable a manual trigger, as shown next. name: MyManualBuild on: [workflow_dispatch] This enables the Run workflow button (see Figure 2-6). Figure 2-6 Run workflow manually You learn about triggers in the next section. Another important component of GitHub Actions is the runner. A runner is a machine or container that executes the workflow. A runner is defined with a runs-on keyword. You can use two types of runners: GitHub-hosted runners or self-hosted runners. Setting up self-hosted runners is discussed in Chapter 6. Each job needs to specify a name and runner.
  • 45.
    The following specifiesa runner hosted by the latest Ubuntu runner (machine). jobs: # This job name is mybuild mybuild: # Runner type that the job will run on runs-on: ubuntu-latest A job is another major part of a workflow. A workflow can have one or more jobs. By default, jobs run in parallel. Hence, if you need to run jobs one after another, dependency should be defined. For example, in the following workflow, the AppCenterDistribute job needs the Android job to complete before it can execute. Dependency is defined with the needs: DependingJobName syntax in each job scope. jobs: Android: runs-on: macos-latest steps: - uses: actions/checkout@v1 # omitted steps for brevity AppCenterDistibute: runs-on: ubuntu-latest needs: Android steps: All workflow steps and actions are defined in a workflow job. The following uses AppCenterDistribute job steps as an example. This example uses a secret in a step, which we discuss in Chapter 4. AppCenterDistibute: runs-on: ubuntu-latest
  • 46.
    needs: Android steps: - uses:actions/download-artifact@v2 with: name: my-artifact - name: App Center uses: wzieba/AppCenter-Github-Action@v1.0.0 with: # App name followed by username appName: Ch-DemoOrg/demoapp # Upload token - you can get one from appcenter.ms/settings token: ${{ secrets.AppCenterAPIToken }} # Distribution group group: alphatesters # Artefact to upload (.apk or .ipa) file: AwesomeApp/AwesomeApp.Android/bin/Debug/com.companyname.AwesomeA pp.apk # Release notes visible on release page releaseNotes: "demo test" So far, you have gained a basic understanding about a workflow’s YAML structure. Now, let’s discuss workflow runs. Go to Actions in the GitHub repository. You find a list of the workflows run, as shown in Figure 2-7 (see the area labeled 2). (We assume that by now you have created at least one workflow, utilizing an available template or sample structure created when you selected the “Set up workflow yourself” option). You can also see run history information for the selected workflow, including run duration, commit, branch, and actor details (see the area labeled 3 in Figure 2- 7). If you click one of the run history records listed, you move to a detailed view of the run.
  • 47.
    Figure 2-7 Workflowruns Click the workflow run history to navigate to the workflow details page (see Figure 2-8).
  • 48.
    Figure 2-8 Workflowrun details You see the workflow name (see the area labeled 1). If you click “build” (your build job may have a different name based on your YAML), it navigates to the build logs, where you can find all the important details regarding the build (see Figure 2-9).
  • 49.
    Figure 2-9 Logof workflow steps You now have a basic understanding of a GitHub Actions workflow. Setting up Continuous Integration Using GitHub Actions Setting up continuous integration is a very important section of the pipelines. It enables teams to ensure that the submitted code is validated. The required important branches are protected, and the deployment happens as expected. In this section, you learn about triggers in GitHub Actions and how to control them in different conditions. When configuring triggers, you need to identify the starting event, which explains the pipeline’s situation. Three main events trigger a GitHub Actions pipeline: pushing a commit to the repository, creating an issue, and creating a pull request. An event is defined using on: syntax. As shown in the following example, a workflow triggers when it pushes changes to the master branch. on: push: branches: [ master ] Similarly, you can trigger both a push and a pull request targeting the master branch, as shown next. on: push: branches: [ master ] pull_request: branches: [ master ] You can use a scheduled event as a trigger using cron: syntax.
  • 50.
    Discovering Diverse ContentThrough Random Scribd Documents
  • 51.
    Fig. 503. 2. Unt.Blätt. bis auf den Grund 5–7teilig; Zipfel keilf., unterseits seidenhaarig glänzend. 6–8. An Felsen der höheren Gebirge Alpen-F., A. alpina L. — Untere Blätt. höchstens bis zur Mitte gespalt. 3 Fig. 504. 3. Blattzipfel ringsum gesägt, unt. Blätt. nicht bis zur Mitte gespalten (Fig. 504). 5–10. Wiesen, Wälder, häufig Wiesen-F., A. vulgáris L. — Blattzipfel am Grunde ganzrand.; untere Blätt. bis zur Mitte geteilt. 7. Riesengebirge. Gespalt. F., A. fissa Schummel 12. Sanguisórba L., Wiesenknopf. IV. Alle Bltn mit Stbblätt. und Stempel; Köpfchen eif.-längl. (Fig. 505), dunkelbraun; Fiederblättch. herzf.-längl. 6–8. Wiesen Großer W., S. officinális L.
  • 52.
    Fig. 505. Obere Bltndes Köpfchens mit Stempeln, die unt. mit Stbblätt.; Köpfchen kugelig (Fig. 506), erst grün, dann rötlich; Blättch. rundl. od. eif.-längl. 5–7. Trockene Hügel Kleiner W., S. minor Scopoli Fig. 506. 13. Agrimónia L., Odermennig. XI. 1. Blättch. unterseits nur auf den Nerven zerstr. steifhaarig; Frbecher der ganzen Länge nach gefurcht; Stacheln am Grunde des Frbechers nach oben gerichtet, dicht zusammenneigend. 7. Nur in Ostpreußen. Behaarter O., A. pilósa Ledebour — Blättch. unterseits kurz grauhaarig, längl. bis längl.-lanzettl. 2 2. Frbecher verkehrt-kegelf., der ganz. Länge nach tief gefurcht, äußere Stacheln weit abstehend (Fig. 507). 6–8. Wegränder, buschige Hügel, verbreitet Kleiner O., A. eupatória L.
  • 53.
    Fig. 507. — Frbecher halbkugelig-glockig,nur bis zur Mitte seicht gefurcht, äußere Stacheln zurückgeschlagen (Fig. 508). 6–8. Waldränder, Gebüsche, sehr zerstr. Großer O., A. odoráta Miller Fig. 508. 14. Rosa L., Rose. XII. 1. Stacheln des Schößlings ungleich, gerade od. gekrümmte derbere mit borsten- od. nadelf. untermischt 18 — Stacheln des Schößlings ziemlich gleich, gerade od. gebogen (bei R. rubiginosa und R. elliptica auch ungleich) 2 2. Griffel zu einem Säulchen von der Länge der Stbblätt. verwachsen 17 — Griffel meist als kurzes Köpfchen hervorragend, viel kürzer als die Stbblätt. (nur bei R. micrantha und R. agrestis verläng.) 3 3. Blättch. unterseits mehr oder weniger drüsig, zuweilen nur auf den Nerven. (Bei einigen Arten finden sich die Drüsen in der Behaarung versteckt) 8
  • 54.
    — Blättchen unterseitsdrüsenlos. (Von R. tomentella und R. tomentosa kommen auch drüsenlose Formen vor) 4 4. Blättchen unterseits behaart 7 — Blättchen völlig kahl 5 5. Kelchzipfel ungeteilt, höchstens die äußeren etwas gezähnt; Blättch. schwach keilf., wie die Zweige blau bereift und rötl. überlaufen; Blkr. klein, rosa; Fr. langgestielt, kugelig. 7. Alpen, Schwarzwald, Vogesen, auch oft angepfl. Rotblättrige R., R. rubrifólia Villars — Kelchzipfel fiederspalt. 6 6. Bltnstiele länger als die Deckblätt.; Kelchzipfel zurückgeschlagen, vor der Frreife abfallend; Blkr. hellrosa, seltener weiß. Sehr veränderlich. 6. Waldränder, Hecken, gemein Hundsrose, R. canína L. — Bltnstiele kürzer als die Deckblätt.; Kelchzipfel aufrecht, erst bei der Frreife abfallend; Griffel in einem weißwolligen Köpfchen. 6. Wegränder, Abhänge, zerstr. Blaugrüne R., R. glauca Villars 7. (4.) Griffel dicht weißwollig; Bltn in den breit. Deckblätt. versteckt; Kelchbl. abstehend bis aufrecht, spät abfallend; Fr. bereift. 6. Zerstr. Lederblättrige R., R. corlifólia Fries — Griffel schwach behaart od. kahl; Bltnstiele wenigstens doppelt so lang als die Deckblätt.; Kelchblätt. zurückgeschlagen, frühzeitig abfallend. 6. Verbreitet Hecken-R., R. dumetórum Thuillier
  • 55.
    8. (3.) Bltnstielemit gestielten Drüsen besetzt 12 — Bltnstiele kahl, selten spärlich drüsig 9 9. Blättch. unterseits auf d. Nerven wenigdrüsig, klein, rundl. od. eif., a. Grunde abgerund., dopp. gesägt, m. breit. drüsentragend. Zähnen; Griffel wollig; Fr. klein, fast kugelig. 6. Im mittl. u. südl. Gebiet, zerstr. Flaum-R., R. tomentélla Leman — Blättch. unterseits reichdrüsig, verkehrt-eif. bis lanzettl., am Grunde mehr oder weniger keilförmig, mit schmalen, spitzen Zähnen 10 10. Griffel verlängert, kahl oder wenig behaart; Kelchzipfel sehr schmal, später zurückgeschlagen, früh abfallend; Bltnstiele länger als die Fr.; Blkr. weißlich; Äste verlängert, dünn. 6. Wie vor. Acker-R., R. agréstis Savi — Griffel in einem kurzen, meist wolligen Köpfchen; Bltnstiele kurz, höchstens so lang als die Fr. Gedrungene Sträucher mit dichtstehenden Zweigen 11 11. Kelchzipfel zurückgeschlagen; Blättch. eif.-längl., am Grunde schwach keilig, oberseits oft mit größeren, leicht abfallend., unterseits mit staubart. feinen Drüsen; Blkr. klein, lebhaft rosa. 6. Selten Nelken-R., R. caryophyllácea Besser — Kelchzipfel aufgerichtet; Blättch. verkehrt-eif., von der Mitte an scharf gesägt, unterseits mit kurz gestielten Drüsen; Blkr. weißlich oder blaßrosa. 6. Süd- und Mitteldeutschl. bis Thüringen und Schlesien. (R. gravéolens Grénier) Elliptische R., R. ellíptica Tausch
  • 56.
    12. (8.) Stachelnmeist kräftig, vom Grunde an sichelförmig gekrümmt; Blättch. klein, starkriechend 16 — Stacheln gerade od. leicht gekrümmt, lang; Blättch. ziemlich groß 13 13. Kelchblätt. nach der Blütezeit zurückgeschlagen, abfällig; Blättch. kahl, starr, lebhaft grün, unterseits auf den starken Nerven drüsig; Blkr. groß, lebhaft rosa. 6. Im südl. und mittl. Gebiet zerstr. (R. jundzíllii Besser) Rauhblättr. R., R. trachyphýlla Rau — Kelchblätt. nach der Blütezeit aufgerichtet od. abstehend, meist bleibend; Blättch. beiderseits behaart, graugrün 14 14. Stacheln schwach gebogen; Blkr. blaßrosa; Kelchblätt. vor der Frreife abfallend; Blättch. grob doppelt gesägt, unterseits graufilzig; Fr. aufrecht. (Ändert ab: Blättch. 3fach drüsig gezähnt, weißgraufilzig, unterseits reichdrüsig; Kelch lange bleibend = R. venústa Scheutz) 6. Verbreitet Filz-R., R. tomentósa Smith — Stacheln völlig gerade; Bltn lebhaft rosa; Fr. nickend 15 15. Fr. groß, kugelig, weichstachelig; Blättch. groß, unterseits filzig. 6. Der Fr. wegen oft angepfl. Apfel-R., R. pomífera Herrmann — Fr. kleiner, nicht weichstachelig; Blättch. kleiner, dicht weichhaarig. 6. 7. Selten Weiche R., R. mollis Smith 16. (12.) Griffel wollig; Kelchzipfel aufrecht od. abstehend; Bltnstiele kurz; Bltn lebhaft rosa. 6. 7. Verbreitet Wein-R., R. rubiginósa L.
  • 57.
    — Griffel kahl;Kelchzipfel zurückgeschlagen; Bltnstiele länger als die Fr.; Blkr. hell fleischrot. 6. 7. Selten (Schlesien, Thüringen, Rheinprovinz) Kleinblütige R., R. micrántha Smith 17. (2.) Äste verlängert, niederliegend; Blättch. dünn, eif. oder elliptisch; Kelchzipfel schwach fiedersp. od. ungeteilt; Blkr. weiß. 6. Im südl. Gebiet. (R. repens Scopoli) Feld-R., R. arvénsis Hudson — Hochwüchsiger Strauch mit hängend. Ästen; Blättch. längl.-eif., oberseits glänzend; Blkr. klein, weiß, rosa überlaufen. 6. 7. Westfalen, Baden. Verwachsengriffelige R., R. stylósa Desvaux 18. (1.) Bltn gelb; Fr. scharlachrot. 6. Angepfl. und verw. Gelbe R., R. lútea Miller — Bltn rot od. weiß 19 19. Kelchzipfel fiedersp.; Blättch. lederig, sehr groß, zu 3–5; Blkr. sehr groß, tiefrot. 6. Im südl. Gebiet bis Thüringen Essigrose, R. gállica L. Eine Abart davon ist vielleicht die in den Gärten kultivierte R. centifólia L., mit sehr großen, krautigen Blätt., die nebst dem Bltnstande reichlich mit Drüsen besetzt sind. Bei einer Form (R. muscósa, Moosrose) finden sich am Bltnstiel und Kelch moosartige Wucherungen. — Kelchzipfel nicht fiedersp., ungeteilt 20 20. Blättch. mittelgroß, zu 5–7, unterseits weichhaarig; Nebenblätt. der nichtblühend. Zweige fast röhrig eingerollt; Kelch bleibend. 5. 6. Süd- und Mitteldeutschl., selten Zimt-R., R. cinnamómea L. — Blättch. klein, zu 7–10 (meist 9), meist kahl; Nebenblätt. alle flach 21
  • 58.
    21. Blättch. einfachgesägt; Kelchzipfel ½ so lang als die weiße Blkr.; Fr. aufrecht. 6. 7. Sonnige Hügel, sehr zerstr. Bibernell-R., R. pimpinellifólia L. — Blättch. doppelt gesägt; Kelchzipfel länger als die rote Blkr.; Fr. hängend. 6. 7. Gebirgswälder, selten Alpen-R., R. alpína Miller 55. Familie. Papilionáceae, Schmetterlingsblütler. 1. Stengel krautig 12 — Stengel holzig 2 2. Blätt. einfach od. 3- bis mehrzählig gefingert 7 — Blätt. gefied. 3 3. Blätt. paarig gefied.; Bltn gelb Caragána 204 — Blätt. unpaarig gefied. 4 4. Flügel u. Schiffchen fehlend; Fahne dunkelviolett Amórpha 204 — Flügel und Schiffchen vorhanden; Bltn weiß, rot od. gelb 5 5. Blblätt. mit einem weit aus dem Kelche hervorragenden Stiel, gelb; Hülsen fast stielrund, an den Gelenken eingeschnürt (Fig. 523) Coronílla 205
  • 59.
    — Blblätt. nichtlang gestielt; Bltn in Trauben 6 6. Bltn gelb; Hülse stark aufgeblasen Colútea 204 — Bltn weiß od. rot; Hülse flach zusammengedrückt Robínia 205 7. (2.) Blkr. gelb 9 — Blkr. weiß od. rosa; Stengel nur unten holzig 8 8. Bltn in doldenf. Köpfchen an der Spitze des Stengels, weiß; Schiffchen schwarzviolett Dorýcnium 204 — Bltn zu 1–2 blattachselst., rosa, selten weiß; Stengel meist dornig Onónis 199 9. Blätt. nadelf., stechend; Blkr. kaum länger als der bis auf den Grund 2teilige Kelch. Strauch mit langen Dornen (Fig. 509) Ulex 198 — Blätt. nicht nadelf.; Blkr. deutl. länger als der Kelch 10 10. Blätt. alle einfach. Kleiner Strauch mit kurzen Dornen od. dornenlos Genísta 198 — Blätt. (wenigstens die unteren) 3zählig 11 11. Griffel sehr lang, kreisf. eingerollt; Bltn groß, einzeln; Hülse an den Nähten zottig; Zweige rutenf., kantig, grün. Besenginster Sarothámnus 198
  • 60.
    — Griffel nichtspiralig eingerollt; Bltn in Trauben, in Köpfchen od. zu zweien Cýtisus 199 12. (1.) Blätt. gefiedert 26 — Blätt. einfach od. 3- bis mehrzählig gefingert 13 13. Bltn einzeln od. zu zweien auf langen Stielen 24 — Die einzelnen Bltn sitzend od. kurzgestielt, oft zu mehreren gehäuft 14 Fig. 509. 14. Alle Blätt. einfach; Stengel platt, breit geflügelt Genísta 198 — Blätt. in ihrer Mehrzahl 3–9zählig gefingert 15 15. Bltn einzeln od. zu zweien in den Blattachseln, im oberen Teile des Stengels zuw. gedrängt 23 — Bltn in Köpfchen, Dolden (Fig. 510) od. Trauben (Fig. 512) 16
  • 61.
    Fig. 510. 16. Blättch.groß (5–7 cm br.); Schiffchen nebst Stbblätt. und Griffel spiralig eingerollt. Bohne Phaséolus 210 — Blättch. viel kleiner; Schiffchen nicht spiralig eingerollt 17 17. Die am Grunde des Blattstiels entspringend. Nebenblätt. den Fiederblättchen gleichgestaltet, so daß dadurch das 3zählige Blatt 5zählig od. gefied. erscheint (Fig. 513–514) 22 — Nebenblätt. viel kleiner als die Fiederblättch., diesen nicht gleichgestaltet (vergl. Fig. 544) 18 18. Blätt. 4–9zählig gefingert 21 — Blätt. 3zählig gefingert 19 19. Blblätt. mit den Stbblätt. und oft auch unter sich verwachsen, zuw. kürzer als der Kelch; reife Fr. kürzer od. wenig länger als der Kelch, von der verwelkten Blkr. eingehüllt (Fig. 511); Bltn in rundl. od. längl. Köpfchen. Klee, Trifólium 201 Fig. 511.
  • 62.
    — Blblätt. wederunter sich, noch mit den Stbblätt. verwachsen, stets länger als der Kelch; reife Fr. aus dem Kelche hervorragend, von der abfallend. Blüte nicht eingehüllt 20 20. Fr. gerade od. schwach gebogen, eif. bis kugelig (Fig. 512); Bltn in lockeren, verlängerten Trauben (nur bei einer starkriechend. Pfl. in blauen Köpfchen), hängend Melilótus 201 Fig. 512. — Fr. nierenf., sichelf. od. schneckenf. eingerollt, zuw. dornig (Fig. 530–533); Bltn in dichten, oft kopff. Trauben, aufrecht Medicágo 200 21. (18.) Bltn in Quirlen od. Trauben; Blätt. meist 7–9zählig gefingert Lupínus 199 — Bltn in Köpfchen; Blätt. 4–5zählig Trifólium 201 22. (17.) Bltn gelb; Schiffchen zugespitzt; Blättch. meist eif. (Fig. 513) Lotus 204
  • 63.
    Fig. 513. — Bltnweiß, mit violetter Schiffchenspitze; Blättch. linealisch (Fig. 514) Dorýcnium 204 Fig. 514. 23. (15.) Pfl. starkriechend; Bltn gelblichweiß; Blätt. alle 3zählig Trigonélla 201 — Pfl. nicht starkriechend; Bltn rosa, selten weiß od. goldgelb; Schiffchen zugespitzt; Blätt. z. T. einfach Onónis 199 24. (13.) Blätt. alle einfach, nicht 3zählig Láthyrus 209 — Blätt. alle 3zählig 25 25. Hülse mit 4 geflügelten Kanten, gerade (Fig. 515); Bltn ansehnlich Tetragonólobus 204
  • 64.
    Fig. 515. — Hülsespiralig gewunden; Bltn klein Medicágo 200 26. (12.) Blätt. paarig gefied. (ohne Endblättch.) 37 — Blätt. unpaarig gefied. (mit Endblättch.) 27 Fig. 516. 27. Untere Blätt. meist ungeteilt; Endblättch. der gefied. Blätt. oft viel größer als die übrigen Blättch.; Bltn goldgelb, selten rötlich, in Köpfchen mit fingerf. geteilten Deckblätt. (Fig. 516) Anthýllis 204 — Alle Blätt. gefied., mit ziemlich gleichen Blättch.; Bltn doldig od. traubig, ohne fingerf. geteilte Deckblätt. 28 28. Bltn in Dolden (die Dolde zuw. nur 2blütig) 34
  • 65.
    — Bltn inTrauben 29 29. Alle Stbfäden verwachsen (Fig. 517); Bltn lila od. weiß; Fr. stielrund, wie die ganze Pfl. kahl; Nebenblätt. halb pfeilf.- lanzettlich, lang stachelspitzig. H. ½-1 m. Gartenpfl., selten wild Galéga 204 Fig. 517. — Hinteres Stbblatt ganz frei, nicht mit den übrigen verwachsen (Fig. 518) 30 Fig. 518. 30. Bltn gelb od. gelblich 33 — Bltn rot od. bläulich, selten weiß 31 31. Hülse der Länge nach mehr od. weniger 2fäch., an einer Naht eingedrückt; Bltn violett, fleischrot od. weiß Astrágalus 205
  • 66.
    — Hülse einfach;Schiffchen länger als die Flügel 32 32. Bltn rosa; Hülse 1samig, rundl. (Fig. 519), reif knochenhart. Als Futterpfl. gebaut Onóbrychis 206 Fig. 519. — Bltn purpurn; Hülse zwischen den Samen eingeschnürt, quer in Glieder zerfallend (Fig. 520). Riesengebirge, Alpen Hedýsarum 206 Fig. 520. 33. (30.) Schiffchen am Ende mit einer gerad. Spitze (Fig. 521); Pfl. rauh behaart Oxýtropis 205 Fig. 521.
  • 67.
    — Schiffchen amEnde stumpf; Pfl. kahl od. mit angedrückten Haaren, selten abstehend behaart und dann alle Blätt. grundst. Astrágalus 205 34. (28.) Blätt. aus 5 Teilblättch. zusammengesetzt 22 — Blätt. aus 7 und mehr Teilblättch. zusammengesetzt 35 35. Stiel der Blblätt. viel länger als der Kelch; Bltn goldgelb; Hülsen zusammengedrückt, mit hufeisenf. gekrümmten Gliedern (Fig. 522) Hippocrépis 206 Fig. 522. — Stiel der Blblätt. so lang od. kürzer als der Kelch, selten länger und dann die Bltn nicht gelb 36
  • 68.
    Fig. 523. 36. Bltn goldgelbod. weiß, mit roter Fahne; Hülsen 4flügelig od. 4kantig (Fig. 523) Coronílla 205 — Bltn rötlichgelb od. Fahne und Flügel schwach rosa; Dolde 2– 8blütig; Hülsen vogelklauenähnlich (Fig. 524) Ornithopus 206 Fig. 524. 37. (26.) Stbfadenröhre rechtwinkl. abgeschnitten; die freien oberen Enden der Stbblätter daher gleich lang (Fig. 525) 39 Fig. 525.
  • 69.
    — Stbfadenröhre schiefabgeschnitten, daher die freien oberen Enden der Stbblätt. verschieden lang (Fig. 526) 38 Fig. 526. 38. Griffel flach, auf der inneren (Fahnen-) Seite behaart; Bltn bläulichweiß, in 1–3blütig., langgestielten Trauben; Kelch sehr tief geteilt; Hülse fast rautenf. (Fig. 527), kahl, meist 2samig. Linse Lens 209 Fig. 527. — Griffel fadenf., entweder unter der Spitze ringsum behaart od. an der Schiffchenseite bärtig Vícia 206 39. Griffel zu einer nach unten offenen Rinne zusammengebogen, auf der inneren Seite bärtig; Nebenblätt. sehr groß, meist größer als die Blättch. Nur angebaut. Erbse Pisum 209 — Griffel flach, auf der ob. Seite mit einer Haarlinie (zuweilen nebst Stbblätt. und Schiffchen um seine Achse gedreht und dann die Flächen nach den Seiten gerichtet); Stengel zuweilen breit geflügelt Láthyrus 209
  • 70.
    1. Ulex L.,Gaspeldorn. XVII. Sandige Orte, im nördl. und westl. Gebiet zerstr. 5. 6. U. europǣus L. 2. Genísta L., Ginster. XVII. 1. Stengel breit geflügelt, gegliedert; Blüten in kopff. Trauben. 5. 6. Trockene Wiesen, sehr zerstr., im nördl. Gebiet fehlend (Cytisus sagittális Koch) Geflügelter G., G. sagittális L. — Stengel nicht geflügelt 2 2. Stengel ohne Dornen 4 — Stengel wenigstens unterwärts mit Dornen 3 3. Junge Triebe wie die Hülsen kahl; Deckblättch. eif., länger als die Bltnstiele; Blätt. blaugrün. 5. 6. Heiden, Nordwestdeutschl., sonst selten Englischer G., G. ánglica L. — Junge Triebe wie die Hülsen rauhhaarig; Deckblättch. pfrieml., etwa ½ so lang als die Bltnstiele; Blätt. grasgrün. 5. 6. Trockene Wälder, nicht selten Deutscher G., G. germánica L. 4. Bltn einzeln oder zu 2, blattachselst.; Fahne, Schiffchen und Fr. seidenhaarig; Stengel liegend. 4–6. Dürre Triften, Heiden, stellenweise Behaarter G., G. pilósa L. — Bltn in endst. Trauben; Blblätt. und Fr. kahl; Stengel aufrecht od. aufsteigend. 6. 7. Trockene Wiesen, Triften, Wälder Färber-G., G. tinctória L.
  • 71.
    3. Sarothámnus Wimmer,Besenginster. XVII. Wegränder, lichte Wälder, Abhänge, verbreitet. 5. 6. S. scopárius Wimmer 4. Cýtisus L., Goldregen, Geißklee. XVII. 1. Bltn in endst., kopff. Dolden oder zu 1–4 (meist 2)blattachselst. (an den Ästen traubenart. gehäuft) 5 — Bltn in unbeblätt. Trauben 2 2. Trauben aufrecht, endst.; Bltn goldgelb 4 — Trauben hängend, seitenst. 3 3. Hülsen seidenhaarig; Blättch. oberseits kahl, unterseits behaart; Bltn goldgelb. 5. 6. Häufig angepfl. Goldregen, C. labúrnum L. — Hülsen kahl; Blätt. am Rande gewimpert, sonst kahl; Bltn hochgelb. 5. 6. Bisweilen angepfl. Alpen-G., C. alpínus Miller 4. Blätt. alle deutlich gestielt, unterseits nebst den Blattstielen und Hülsen angedrückt behaart; Traube reichblütig; Äste rutenf. 6–8. Beim Trocknen schwarz werdend. Steinige, trockene Orte, selten, zuweilen als Zierstrauch angepflanzt Schwarzer G., C. nígricans L. — Obere Blätt. sitzend; Bltnstiele, Hülsen und Blätt. kahl; Traube 4– 8blütig. Nicht schwarz werdend. 5. 6. In Anlagen Italienischer G., C. sessilifólius L. 5. Bltn in kopff. Dolden, daneben auch einzeln stehende Bltn; Äste aufrecht abstehend; alle Teile der Pfl. rauhhaarig. 6–8. Lichte
  • 72.
    Wälder, Gesträuch, sonnigeOrte, selten, auch angepfl. und verw. Kopfiger G., C. capitátus Jacquin — Bltn meist zu 2, blattachselst.; Äste lang, niederliegend; Blätt. unterseits nebst den Kelchen und Bltnstielen angedrückt seidenhaarig. 5. 6. Lichte Wälder, Gesträuch, sonnige Hügel, im südl. und östl. Deutschl. Zwillings-G., C. ratisbonénsis Schäffer 5. Lupínus L., Lupine. XVII. 1. Bltn gelb, in traubig angeordneten Quirlen. 6–9. Angebaut Gelbe L., L. lúteus L. — Bltn blau od. weiß, in endst. Trauben 2 2. Bltn blau; Blättch. linealisch. 6–9. Wie vor. Blaue L., L. angustifólius L. — Bltn weiß; Blättch. verkehrt-eif.-längl. 6–9. Seltener gebaut Weiße L., L. albus L. 6. Onónis L., Hauhechel. XVII. 1. Hülsen so lang od. länger als der Kelch; Stengel 1- od. 2reihig behaart, meist stark dornig; Dornen oft zu 2. 6–9. Triften, Wiesen, Wege, meist häufig Dornige H., O. spinósa L. — Hülsen kürzer als der Kelch; Stengel ringsum behaart; Blätt. drüsig 2
  • 73.
    Fig. 528. 2. Stengel ausgebreitet,dornenlos od. zerstr. dornig; Blättch. vorn abgerundet (Fig. 528); Bltn entfernt, meist einzeln. 6–9. Sandige Triften, Wegränder, trockene Wiesen Kriechende H., O. repens L. — Stengel aufrecht oder aufstrebend, stets dornenlos; Blättch. mehr od. weniger spitz (Fig. 529); Bltn zu 2, an den Enden der Äste traubig gehäuft; Fahne stumpf. 7. 8. Wie vor. Im östl. Deutschl. Stinkende H., O. arvénsis L. Die gelbblühende O. natrix Lamarck kommt im Gebiete nur bei Gorze unweit Metz vor. Fig. 529. 7. Medicágo L., Schneckenklee. XVII. 1. Bltn blau od. violett; Hülsen mit 2–3, im Mittelpunkte offenen Windungen (Fig. 530). 6–9. Gebaut und verwild. Luzerne, M. satíva L. Fig. 530.
  • 74.
    M. falcata ×satíva (M. média Persoon) hat anfangs gelbe, dann grüne, später violette od. bläul. Bltn; Hülsen mit ½-2½ Windungen. — Bltn gelb 2 2. Köpfchen reichblütig; Hülsen sichelf. od. mit einer einzig. Windung, ring- od. nierenf., dornenlos 6 — Köpfchen 1–8blütig; Hülsen schneckenf., mit 2–6 Windungen, dornig (Fig. 531) 3 Fig. 531. 3. Windungen der Hülsen 5–10 mm im Durchmesser; Samen durch Scheidewände getrennt 5 — Windungen der Hülsen 3–4 mm im Durchmesser; Samen durch Scheidewände nicht getrennt 4 4. Traube 1–8blütig; Kelchzähne so lang als die Kelchröhre; Nebenblätt. ganzrand. od. am Grunde gezähnelt; Hülsen mit 4–5 Windungen, die kaum sichtbar geadert sind; Stacheln hakig. 5–7. Trockene Hügel, stellenweise, in Nordwestdeutschl. und Ostpreußen fehlend Kleinster Sch., M. mínima Bartalini — Traube 1–2blütig; Kelchzähne kürzer als die Kelchröhre; Nebenblätt. gezähnt; Hülsen mit 3–5 deutlich geaderten Windungen. 6. 7. Zuweilen eingeschleppt und verw. Ascherson's-Sch., M. aschersoniána Urban
  • 75.
    5. Blättchen meistgefleckt; Traube 1–5blütig; Flügel kürzer als das Schiffchen; Stengel von gegliederten Haaren etwas rauh. 5. 6. Eingeschleppt und in der Nähe von Fabriken verw. Arabischer Sch., M. arábica Allioni — Blättch. ungefleckt; Traube 7–8blütig; Flügel länger als das Schiffchen; Steng. kahl od. mit einfachen Haaren besetzt. 5–8. Äcker, Schutt. Eingeschleppt. Rauher Sch., M. híspida Gærtner M. rigídula Desrousseaux, mit beiderseits behaarten Blättch. und filzigen Hülsen, findet sich hier und da nebst einigen anderen Arten eingeschleppt. Fig. 532. 6. Bltn bis 1 cm groß; Hülsen sichel- od. ringf. gekrümmt (Fig. 532), etwa 1 cm lang. 6–9. Wege, Hügel, zerstr. Sichelklee, M. falcáta L. — Bltn bis 3 mm groß; Hülsen nierenf., in der Mitte ohne Lücke (Fig. 533), etwa 2 mm lang. 6–9. Wiesen, Grasplätze, häufig Hopfenklee, M. lupulina L. Fig. 533. 8. Trigonélla L., Bockshornklee. XVII. Hülsen 8–15 cm lang, etwas gebogen. 6. 7. Selten gebaut und verwildert T. foenum graecum L.
  • 76.
    9. Melilótus Lamarck,Steinklee. XVII. 1. Bltn gelb 3 — Bltn blau od. weiß 2 2. Bltn in lockeren Trauben, weiß; Bltnstielchen ½ so lang als der Kelch; Flügel kürzer als die Fahne. 7–9. Unbebaute Orte Weißer St., M. albus Desrousseaux Bei dem hier und da eingeschleppten M. ruthénicus M. B. sind die Bltnstielchen länger als der Kelch und die Flügel fast so lang als die Fahne. — Bltn in rundl. Köpfchen, blau. 6. 7. Gebaut u. verw. Schabziegerklee, M. cœrúleus Desrousseaux 3. Nebenblätt. ganzrandig. Pfl. mit starkem Geruch 5 — Nebenblätt. am Grunde breiter und hier gezähnt (Fig. 534) 4 Fig. 534. 4. Flügel länger als das Schiffchen; Hülsen eif., spitzlich. 5–9. Salzhaltige Orte, sehr zerstr. Gezähnter St., M. dentátus Persoon — Flügel so lang als das Schiffchen; Bltn sehr klein; Hülsen fast kugelig, sehr stumpf; Nebenblätt. mitunter ganzrandig. 6. 7. Zuweilen eingeschleppt. Kleinblütiger St., M. parviflórus Desfontaines