gha
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5bEntrypoint
Return Type
Gha !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| eventSrc | File ! | - | No description provided |
Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
--event-src file:pathfunc (m *MyModule) Example(eventSrc *dagger.File) *dagger.Gha {
return dag.
Gha(eventSrc)
}@function
def example(event_src: dagger.File) -> dagger.Gha:
return (
dag.gha(event_src)
)@func()
example(eventSrc: File): Gha {
return dag
.gha(eventSrc)
}Types
Gha 🔗
githubEvent() 🔗
Return Type
GithubEvent ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
--event-src file:path github-eventfunc (m *MyModule) Example(eventSrc *dagger.File) *dagger.GhaGithubEvent {
return dag.
Gha(eventSrc).
GithubEvent()
}@function
def example(event_src: dagger.File) -> dagger.GhaGithubEvent:
return (
dag.gha(event_src)
.github_event()
)@func()
example(eventSrc: File): GhaGithubEvent {
return dag
.gha(eventSrc)
.githubEvent()
}withPipeline() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Pipeline !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
--event-src file:path with-pipeline --name stringfunc (m *MyModule) Example(eventSrc *dagger.File, name string) *dagger.GhaPipeline {
return dag.
Gha(eventSrc).
WithPipeline(name)
}@function
def example(event_src: dagger.File, name: str) -> dagger.GhaPipeline:
return (
dag.gha(event_src)
.with_pipeline(name)
)@func()
example(eventSrc: File, name: string): GhaPipeline {
return dag
.gha(eventSrc)
.withPipeline(name)
}Pipeline 🔗
runsOn() 🔗
Return Type
String ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
runs-onfunc (m *MyModule) Example(ctx context.Context, name string) string {
return dag.
Gha().
WithPipeline(name).
RunsOn(ctx)
}@function
async def example(name: str) -> str:
return await (
dag.gha()
.with_pipeline(name)
.runs_on()
)@func()
async example(name: string): Promise<string> {
return dag
.gha()
.withPipeline(name)
.runsOn()
}changes() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
changesfunc (m *MyModule) Example(ctx context.Context, name string) []string {
return dag.
Gha().
WithPipeline(name).
Changes(ctx)
}@function
async def example(name: str) -> List[str]:
return await (
dag.gha()
.with_pipeline(name)
.changes()
)@func()
async example(name: string): Promise<string[]> {
return dag
.gha()
.withPipeline(name)
.changes()
}name() 🔗
Return Type
String ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
namefunc (m *MyModule) Example(ctx context.Context, name string) string {
return dag.
Gha().
WithPipeline(name).
Name(ctx)
}@function
async def example(name: str) -> str:
return await (
dag.gha()
.with_pipeline(name)
.name()
)@func()
async example(name: string): Promise<string> {
return dag
.gha()
.withPipeline(name)
.name()
}event() 🔗
Return Type
GithubEvent ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
eventfunc (m *MyModule) Example(name string) *dagger.GhaGithubEvent {
return dag.
Gha().
WithPipeline(name).
Event()
}@function
def example(name: str) -> dagger.GhaGithubEvent:
return (
dag.gha()
.with_pipeline(name)
.event()
)@func()
example(name: string): GhaGithubEvent {
return dag
.gha()
.withPipeline(name)
.event()
}actions() 🔗
Return Type
[Enum ! ] ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
actionsfunc (m *MyModule) Example(name string) [] {
return dag.
Gha().
WithPipeline(name).
Actions()
}@function
def example(name: str) -> List[]:
return (
dag.gha()
.with_pipeline(name)
.actions()
)@func()
example(name: string): [] {
return dag
.gha()
.withPipeline(name)
.actions()
}onPullRequest() 🔗
Return Type
Boolean ! Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
on-pull-requestfunc (m *MyModule) Example(ctx context.Context, name string) bool {
return dag.
Gha().
WithPipeline(name).
OnPullRequest(ctx)
}@function
async def example(name: str) -> bool:
return await (
dag.gha()
.with_pipeline(name)
.on_pull_request()
)@func()
async example(name: string): Promise<boolean> {
return dag
.gha()
.withPipeline(name)
.onPullRequest()
}withRunsOn() 🔗
Return Type
Pipeline !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
with-runs-on --name stringfunc (m *MyModule) Example(name string, name1 string) *dagger.GhaPipeline {
return dag.
Gha().
WithPipeline(name).
WithRunsOn(name1)
}@function
def example(name: str, name1: str) -> dagger.GhaPipeline:
return (
dag.gha()
.with_pipeline(name)
.with_runs_on(name1)
)@func()
example(name: string, name1: string): GhaPipeline {
return dag
.gha()
.withPipeline(name)
.withRunsOn(name1)
}withOnPullRequest() 🔗
Return Type
Pipeline !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| actions | [Enum ! ] ! | - | No description provided |
Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
with-on-pull-requestfunc (m *MyModule) Example(name string, actions []) *dagger.GhaPipeline {
return dag.
Gha().
WithPipeline(name).
WithOnPullRequest(actions)
}@function
def example(name: str, actions: List[]) -> dagger.GhaPipeline:
return (
dag.gha()
.with_pipeline(name)
.with_on_pull_request(actions)
)@func()
example(name: string, actions: []): GhaPipeline {
return dag
.gha()
.withPipeline(name)
.withOnPullRequest(actions)
}withOnChanges() 🔗
Return Type
Pipeline !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| paths | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
with-on-changes --paths string1 --paths string2func (m *MyModule) Example(name string, paths []string) *dagger.GhaPipeline {
return dag.
Gha().
WithPipeline(name).
WithOnChanges(paths)
}@function
def example(name: str, paths: List[str]) -> dagger.GhaPipeline:
return (
dag.gha()
.with_pipeline(name)
.with_on_changes(paths)
)@func()
example(name: string, paths: string[]): GhaPipeline {
return dag
.gha()
.withPipeline(name)
.withOnChanges(paths)
}call() 🔗
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| exec | String ! | - | No description provided |
Example
dagger -m github.com/franela/pocketci/modules/gha@c3368c6f97531f4a642e8ad4b66828e9232c9f5b call \
with-pipeline --name string \
call --exec stringfunc (m *MyModule) Example(ctx context.Context, name string, exec string) {
return dag.
Gha().
WithPipeline(name).
Call(ctx, exec)
}@function
async def example(name: str, exec: str) -> None:
return await (
dag.gha()
.with_pipeline(name)
.call(exec)
)@func()
async example(name: string, exec: string): Promise<void> {
return dag
.gha()
.withPipeline(name)
.call(exec)
}GithubEvent 🔗
filesChanged() 🔗
Return Type
[String ! ] ! Example
Function GhaGithubEvent.filesChanged is not accessible from the gha moduleFunction GhaGithubEvent.filesChanged is not accessible from the gha moduleFunction GhaGithubEvent.filesChanged is not accessible from the gha moduleFunction GhaGithubEvent.filesChanged is not accessible from the gha modulepullRequest() 🔗
Return Type
PullRequest ! Example
Function GhaGithubEvent.pullRequest is not accessible from the gha moduleFunction GhaGithubEvent.pullRequest is not accessible from the gha moduleFunction GhaGithubEvent.pullRequest is not accessible from the gha moduleFunction GhaGithubEvent.pullRequest is not accessible from the gha modulePullRequest 🔗
action() 🔗
Action is the action that was performed. Possible values are: “assigned”, “unassigned”, “review_requested”, “review_request_removed”, “labeled”, “unlabeled”, “opened”, “edited”, “closed”, “ready_for_review”, “locked”, “unlocked”, or “reopened”. If the action is “closed” and the “merged” key is “false”, the pull request was closed with unmerged commits. If the action is “closed” and the “merged” key is “true”, the pull request was merged. While webhooks are also triggered when a pull request is synchronized, Events API timelines don’t include pull request events with the “synchronize” action.
Return Type
String ! Example
Function GhaPullRequest.action is not accessible from the gha moduleFunction GhaPullRequest.action is not accessible from the gha moduleFunction GhaPullRequest.action is not accessible from the gha moduleFunction GhaPullRequest.action is not accessible from the gha modulenumber() 🔗
Return Type
Integer ! Example
Function GhaPullRequest.number is not accessible from the gha moduleFunction GhaPullRequest.number is not accessible from the gha moduleFunction GhaPullRequest.number is not accessible from the gha moduleFunction GhaPullRequest.number is not accessible from the gha modulepullRequest() 🔗
Return Type
PullRequestSpec ! Example
Function GhaPullRequest.pullRequest is not accessible from the gha moduleFunction GhaPullRequest.pullRequest is not accessible from the gha moduleFunction GhaPullRequest.pullRequest is not accessible from the gha moduleFunction GhaPullRequest.pullRequest is not accessible from the gha modulerepo() 🔗
Return Type
Repository ! Example
Function GhaPullRequest.repo is not accessible from the gha moduleFunction GhaPullRequest.repo is not accessible from the gha moduleFunction GhaPullRequest.repo is not accessible from the gha moduleFunction GhaPullRequest.repo is not accessible from the gha modulelabel() 🔗
Return Type
String ! Example
Function GhaPullRequest.label is not accessible from the gha moduleFunction GhaPullRequest.label is not accessible from the gha moduleFunction GhaPullRequest.label is not accessible from the gha moduleFunction GhaPullRequest.label is not accessible from the gha modulePullRequestSpec 🔗
number() 🔗
Return Type
Integer ! Example
Function GhaPullRequestSpec.number is not accessible from the gha moduleFunction GhaPullRequestSpec.number is not accessible from the gha moduleFunction GhaPullRequestSpec.number is not accessible from the gha moduleFunction GhaPullRequestSpec.number is not accessible from the gha modulestate() 🔗
Return Type
String ! Example
Function GhaPullRequestSpec.state is not accessible from the gha moduleFunction GhaPullRequestSpec.state is not accessible from the gha moduleFunction GhaPullRequestSpec.state is not accessible from the gha moduleFunction GhaPullRequestSpec.state is not accessible from the gha modulelocked() 🔗
Return Type
Boolean ! Example
Function GhaPullRequestSpec.locked is not accessible from the gha moduleFunction GhaPullRequestSpec.locked is not accessible from the gha moduleFunction GhaPullRequestSpec.locked is not accessible from the gha moduleFunction GhaPullRequestSpec.locked is not accessible from the gha modulecreatedAt() 🔗
Return Type
String ! Example
Function GhaPullRequestSpec.createdAt is not accessible from the gha moduleFunction GhaPullRequestSpec.createdAt is not accessible from the gha moduleFunction GhaPullRequestSpec.createdAt is not accessible from the gha moduleFunction GhaPullRequestSpec.createdAt is not accessible from the gha moduleupdatedAt() 🔗
Return Type
String ! Example
Function GhaPullRequestSpec.updatedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.updatedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.updatedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.updatedAt is not accessible from the gha moduleclosedAt() 🔗
Return Type
String ! Example
Function GhaPullRequestSpec.closedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.closedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.closedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.closedAt is not accessible from the gha modulemergedAt() 🔗
Return Type
String ! Example
Function GhaPullRequestSpec.mergedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.mergedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.mergedAt is not accessible from the gha moduleFunction GhaPullRequestSpec.mergedAt is not accessible from the gha modulelabels() 🔗
Return Type
[String ! ] ! Example
Function GhaPullRequestSpec.labels is not accessible from the gha moduleFunction GhaPullRequestSpec.labels is not accessible from the gha moduleFunction GhaPullRequestSpec.labels is not accessible from the gha moduleFunction GhaPullRequestSpec.labels is not accessible from the gha modulemerged() 🔗
Return Type
Boolean ! Example
Function GhaPullRequestSpec.merged is not accessible from the gha moduleFunction GhaPullRequestSpec.merged is not accessible from the gha moduleFunction GhaPullRequestSpec.merged is not accessible from the gha moduleFunction GhaPullRequestSpec.merged is not accessible from the gha modulemergeable() 🔗
Return Type
Boolean ! Example
Function GhaPullRequestSpec.mergeable is not accessible from the gha moduleFunction GhaPullRequestSpec.mergeable is not accessible from the gha moduleFunction GhaPullRequestSpec.mergeable is not accessible from the gha moduleFunction GhaPullRequestSpec.mergeable is not accessible from the gha modulemergeableState() 🔗
Return Type
String ! Example
Function GhaPullRequestSpec.mergeableState is not accessible from the gha moduleFunction GhaPullRequestSpec.mergeableState is not accessible from the gha moduleFunction GhaPullRequestSpec.mergeableState is not accessible from the gha moduleFunction GhaPullRequestSpec.mergeableState is not accessible from the gha modulehead() 🔗
Return Type
PullRequestBranch ! Example
Function GhaPullRequestSpec.head is not accessible from the gha moduleFunction GhaPullRequestSpec.head is not accessible from the gha moduleFunction GhaPullRequestSpec.head is not accessible from the gha moduleFunction GhaPullRequestSpec.head is not accessible from the gha modulebase() 🔗
Return Type
PullRequestBranch ! Example
Function GhaPullRequestSpec.base is not accessible from the gha moduleFunction GhaPullRequestSpec.base is not accessible from the gha moduleFunction GhaPullRequestSpec.base is not accessible from the gha moduleFunction GhaPullRequestSpec.base is not accessible from the gha moduleRepository 🔗
owner() 🔗
Return Type
User ! Example
Function GhaRepository.owner is not accessible from the gha moduleFunction GhaRepository.owner is not accessible from the gha moduleFunction GhaRepository.owner is not accessible from the gha moduleFunction GhaRepository.owner is not accessible from the gha modulename() 🔗
Return Type
String ! Example
Function GhaRepository.name is not accessible from the gha moduleFunction GhaRepository.name is not accessible from the gha moduleFunction GhaRepository.name is not accessible from the gha moduleFunction GhaRepository.name is not accessible from the gha modulefullName() 🔗
Return Type
String ! Example
Function GhaRepository.fullName is not accessible from the gha moduleFunction GhaRepository.fullName is not accessible from the gha moduleFunction GhaRepository.fullName is not accessible from the gha moduleFunction GhaRepository.fullName is not accessible from the gha modulePullRequestBranch 🔗
label() 🔗
Return Type
String ! Example
Function GhaPullRequestBranch.label is not accessible from the gha moduleFunction GhaPullRequestBranch.label is not accessible from the gha moduleFunction GhaPullRequestBranch.label is not accessible from the gha moduleFunction GhaPullRequestBranch.label is not accessible from the gha moduleref() 🔗
Return Type
String ! Example
Function GhaPullRequestBranch.ref is not accessible from the gha moduleFunction GhaPullRequestBranch.ref is not accessible from the gha moduleFunction GhaPullRequestBranch.ref is not accessible from the gha moduleFunction GhaPullRequestBranch.ref is not accessible from the gha modulesha() 🔗
Return Type
String ! Example
Function GhaPullRequestBranch.sha is not accessible from the gha moduleFunction GhaPullRequestBranch.sha is not accessible from the gha moduleFunction GhaPullRequestBranch.sha is not accessible from the gha moduleFunction GhaPullRequestBranch.sha is not accessible from the gha modulerepo() 🔗
Return Type
Repository ! Example
Function GhaPullRequestBranch.repo is not accessible from the gha moduleFunction GhaPullRequestBranch.repo is not accessible from the gha moduleFunction GhaPullRequestBranch.repo is not accessible from the gha moduleFunction GhaPullRequestBranch.repo is not accessible from the gha moduleUser 🔗
login() 🔗
Return Type
String ! Example
Function GhaUser.login is not accessible from the gha moduleFunction GhaUser.login is not accessible from the gha moduleFunction GhaUser.login is not accessible from the gha moduleFunction GhaUser.login is not accessible from the gha modulename() 🔗
Return Type
String ! Example
Function GhaUser.name is not accessible from the gha moduleFunction GhaUser.name is not accessible from the gha moduleFunction GhaUser.name is not accessible from the gha moduleFunction GhaUser.name is not accessible from the gha moduleuserType() 🔗
Return Type
String ! Example
Function GhaUser.userType is not accessible from the gha moduleFunction GhaUser.userType is not accessible from the gha moduleFunction GhaUser.userType is not accessible from the gha moduleFunction GhaUser.userType is not accessible from the gha module