github.workflows
Submodule
Structs
AppPermissions
The permissions available to a GitHub App.
Typically a token for a GitHub App has all the available scopes/permissions available to the app itself; however, a more limited set of permissions can be specified. When permissions are provided, only the specified permissions are granted to the token.
https://github.com/actions/create-github-app-token/blob/main/action.yml#L28
Initializer
import { github } from 'projen'
const appPermissions: github.workflows.AppPermissions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
| projen.github.workflows.AppPermission | No description. |
actions
Optional
public readonly actions: AppPermission;
- Type: projen.github.workflows.AppPermission
administration
Optional
public readonly administration: AppPermission;
- Type: projen.github.workflows.AppPermission
attestations
Optional
public readonly attestations: AppPermission;
- Type: projen.github.workflows.AppPermission
checks
Optional
public readonly checks: AppPermission;
- Type: projen.github.workflows.AppPermission
codespaces
Optional
public readonly codespaces: AppPermission;
- Type: projen.github.workflows.AppPermission
contents
Optional
public readonly contents: AppPermission;
- Type: projen.github.workflows.AppPermission
dependabotSecrets
Optional
public readonly dependabotSecrets: AppPermission;
- Type: projen.github.workflows.AppPermission
deployments
Optional
public readonly deployments: AppPermission;
- Type: projen.github.workflows.AppPermission
emailAddresses
Optional
public readonly emailAddresses: AppPermission;
- Type: projen.github.workflows.AppPermission
environments
Optional
public readonly environments: AppPermission;
- Type: projen.github.workflows.AppPermission
followers
Optional
public readonly followers: AppPermission;
- Type: projen.github.workflows.AppPermission
gitSshKeys
Optional
public readonly gitSshKeys: AppPermission;
- Type: projen.github.workflows.AppPermission
gpgKeys
Optional
public readonly gpgKeys: AppPermission;
- Type: projen.github.workflows.AppPermission
interactionLimits
Optional
public readonly interactionLimits: AppPermission;
- Type: projen.github.workflows.AppPermission
issues
Optional
public readonly issues: AppPermission;
- Type: projen.github.workflows.AppPermission
members
Optional
public readonly members: AppPermission;
- Type: projen.github.workflows.AppPermission
metadata
Optional
public readonly metadata: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationAdministration
Optional
public readonly organizationAdministration: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationAnnouncementBanners
Optional
public readonly organizationAnnouncementBanners: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationCopilotSeatManagement
Optional
public readonly organizationCopilotSeatManagement: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationCustomOrgRoles
Optional
public readonly organizationCustomOrgRoles: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationCustomProperties
Optional
public readonly organizationCustomProperties: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationCustomRoles
Optional
public readonly organizationCustomRoles: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationEvents
Optional
public readonly organizationEvents: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationHooks
Optional
public readonly organizationHooks: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationPackages
Optional
public readonly organizationPackages: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationPersonalAccessTokenRequests
Optional
public readonly organizationPersonalAccessTokenRequests: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationPersonalAccessTokens
Optional
public readonly organizationPersonalAccessTokens: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationPlan
Optional
public readonly organizationPlan: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationProjects
Optional
public readonly organizationProjects: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationSecrets
Optional
public readonly organizationSecrets: AppPermission;
- Type: projen.github.workflows.AppPermission
organizationSelfHostedRunners
Optional
public readonly organizationSelfHostedRunners: AppPermission;
- Type: projen.github.workflows.AppPermission
orgnaizationUserBlocking
Optional
public readonly orgnaizationUserBlocking: AppPermission;
- Type: projen.github.workflows.AppPermission
packages
Optional
public readonly packages: AppPermission;
- Type: projen.github.workflows.AppPermission
pages
Optional
public readonly pages: AppPermission;
- Type: projen.github.workflows.AppPermission
profile
Optional
public readonly profile: AppPermission;
- Type: projen.github.workflows.AppPermission
pullRequests
Optional
public readonly pullRequests: AppPermission;
- Type: projen.github.workflows.AppPermission
repositoryAnnouncementBanners
Optional
repositoryAnnouncementBanners
- Deprecated: removed by GitHub
public readonly repositoryAnnouncementBanners: AppPermission;
- Type: projen.github.workflows.AppPermission
repositoryCustomProperties
Optional
public readonly repositoryCustomProperties: AppPermission;
- Type: projen.github.workflows.AppPermission
repositoryHooks
Optional
public readonly repositoryHooks: AppPermission;
- Type: projen.github.workflows.AppPermission
repositoryProjects
Optional
public readonly repositoryProjects: AppPermission;
- Type: projen.github.workflows.AppPermission
secrets
Optional
public readonly secrets: AppPermission;
- Type: projen.github.workflows.AppPermission
secretScanningAlerts
Optional
public readonly secretScanningAlerts: AppPermission;
- Type: projen.github.workflows.AppPermission
securityEvents
Optional
public readonly securityEvents: AppPermission;
- Type: projen.github.workflows.AppPermission
singleFile
Optional
public readonly singleFile: AppPermission;
- Type: projen.github.workflows.AppPermission
starring
Optional
public readonly starring: AppPermission;
- Type: projen.github.workflows.AppPermission
statuses
Optional
public readonly statuses: AppPermission;
- Type: projen.github.workflows.AppPermission
teamDiscussions
Optional
public readonly teamDiscussions: AppPermission;
- Type: projen.github.workflows.AppPermission
vulnerabilityAlerts
Optional
public readonly vulnerabilityAlerts: AppPermission;
- Type: projen.github.workflows.AppPermission
workflows
Optional
public readonly workflows: AppPermission;
- Type: projen.github.workflows.AppPermission
BranchProtectionRuleOptions
Branch Protection Rule options.
Initializer
import { github } from 'projen'
const branchProtectionRuleOptions: github.workflows.BranchProtectionRuleOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string[] | Which activity types to trigger on. |
types
Optional
public readonly types: string[];
- Type: string[]
Which activity types to trigger on.
CheckRunOptions
Check run options.
Initializer
import { github } from 'projen'
const checkRunOptions: github.workflows.CheckRunOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string[] | Which activity types to trigger on. |
types
Optional
public readonly types: string[];
- Type: string[]
Which activity types to trigger on.
CheckSuiteOptions
Check suite options.
Initializer
import { github } from 'projen'
const checkSuiteOptions: github.workflows.CheckSuiteOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string[] | Which activity types to trigger on. |
types
Optional
public readonly types: string[];
- Type: string[]
Which activity types to trigger on.
CommonJobDefinition
Initializer
import { github } from 'projen'
const commonJobDefinition: github.workflows.CommonJobDefinition = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobPermissions | You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access. |
| any | Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. |
| string | You can use the if conditional to prevent a job from running unless a condition is met. |
| string | The name of the job displayed on GitHub. |
| string[] | Identifies any jobs that must complete successfully before this job will run. |
| projen.github.workflows.JobStrategy | A strategy creates a build matrix for your jobs. |
permissions
Required
public readonly permissions: JobPermissions;
- Type: projen.github.workflows.JobPermissions
You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access.
Use { contents: READ }
if your job only needs to clone code.
This is intentionally a required field since it is required in order to allow workflows to run in GitHub repositories with restricted default access.
concurrency
Optional
public readonly concurrency: any;
- Type: any
Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.
A concurrency group can be any string or expression. The expression can use any context except for the secrets context.
if
Optional
public readonly if: string;
- Type: string
You can use the if conditional to prevent a job from running unless a condition is met.
You can use any supported context and expression to create a conditional.
name
Optional
public readonly name: string;
- Type: string
The name of the job displayed on GitHub.
needs
Optional
public readonly needs: string[];
- Type: string[]
Identifies any jobs that must complete successfully before this job will run.
It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue.
strategy
Optional
public readonly strategy: JobStrategy;
- Type: projen.github.workflows.JobStrategy
A strategy creates a build matrix for your jobs.
You can define different variations to run each job in.
ContainerCredentials
Credentials to use to authenticate to Docker registries.
Initializer
import { github } from 'projen'
const containerCredentials: github.workflows.ContainerCredentials = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | The password. |
| string | The username. |
password
Required
public readonly password: string;
- Type: string
The password.
username
Required
public readonly username: string;
- Type: string
The username.
ContainerOptions
Options pertaining to container environments.
Initializer
import { github } from 'projen'
const containerOptions: github.workflows.ContainerOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | The Docker image to use as the container to run the action. |
| projen.github.workflows.ContainerCredentials | f the image's container registry requires authentication to pull the image, you can use credentials to set a map of the username and password. |
| {[ key: string ]: string} | Sets a map of environment variables in the container. |
| string[] | Additional Docker container resource options. |
| number[] | Sets an array of ports to expose on the container. |
| string[] | Sets an array of volumes for the container to use. |
image
Required
public readonly image: string;
- Type: string
The Docker image to use as the container to run the action.
The value can be the Docker Hub image name or a registry name.
credentials
Optional
public readonly credentials: ContainerCredentials;
- Type: projen.github.workflows.ContainerCredentials
f the image's container registry requires authentication to pull the image, you can use credentials to set a map of the username and password.
The credentials are the same values that you would provide to the docker login command.
env
Optional
public readonly env: {[ key: string ]: string};
- Type: {[ key: string ]: string}
Sets a map of environment variables in the container.
options
Optional
public readonly options: string[];
- Type: string[]
Additional Docker container resource options.
https://docs.docker.com/engine/reference/commandline/create/#options
ports
Optional
public readonly ports: number[];
- Type: number[]
Sets an array of ports to expose on the container.
volumes
Optional
public readonly volumes: string[];
- Type: string[]
Sets an array of volumes for the container to use.
You can use volumes to share data between services or other steps in a job. You can specify named Docker volumes, anonymous Docker volumes, or bind mounts on the host.
To specify a volume, you specify the source and destination path:
<source>:<destinationPath>
.
CreateOptions
The Create event accepts no options.
Initializer
import { github } from 'projen'
const createOptions: github.workflows.CreateOptions = { ... }
CronScheduleOptions
CRON schedule options.
Initializer
import { github } from 'projen'
const cronScheduleOptions: github.workflows.CronScheduleOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | No description. |
cron
Required
public readonly cron: string;
- Type: string
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
DeleteOptions
The Delete event accepts no options.
Initializer
import { github } from 'projen'
const deleteOptions: github.workflows.DeleteOptions = { ... }
DeploymentOptions
The Deployment event accepts no options.
Initializer
import { github } from 'projen'
const deploymentOptions: github.workflows.DeploymentOptions = { ... }
DeploymentStatusOptions
The Deployment status event accepts no options.
Initializer
import { github } from 'projen'
const deploymentStatusOptions: github.workflows.DeploymentStatusOptions = { ... }
DiscussionCommentOptions
Discussion comment options.
Initializer
import { github } from 'projen'
const discussionCommentOptions: github.workflows.DiscussionCommentOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string[] | Which activity types to trigger on. |
types
Optional
public readonly types: string[];
- Type: string[]
Which activity types to trigger on.
DiscussionOptions
Discussion options.