github
No long description provided.
Installation
dagger install github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc
Entrypoint
Return Type
Github
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
func (m *myModule) example() *Github {
return dag.
Github()
}
@function
def example() -> dag.Github:
return (
dag.github()
)
@func()
example(): Github {
return dag
.github()
}
Types
Github 🔗
token() 🔗
Return Type
Secret !
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
token
func (m *myModule) example() *Secret {
return dag.
Github().
Token()
}
@function
def example() -> dagger.Secret:
return (
dag.github()
.token()
)
@func()
example(): Secret {
return dag
.github()
.token()
}
withToken() 🔗
WithToken sets the GithHub token for any opeations that require it
Return Type
Github !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
with-token --token env:MYSECRET
func (m *myModule) example(token *Secret) *Github {
return dag.
Github().
WithToken(token)
}
@function
def example(token: dagger.Secret) -> dag.Github:
return (
dag.github()
.with_token(token)
)
@func()
example(token: Secret): Github {
return dag
.github()
.withToken(token)
}
createRelease() 🔗
TagRepository creates a tag for a repository with the given commit sha and an optional list of files note: only the top level files in the directory will be uploaded, this function does not support subdirectories
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
owner | String ! | - | No description provided |
repo | String ! | - | No description provided |
tag | String ! | - | No description provided |
sha | String ! | - | No description provided |
name | String | - | No description provided |
files | Directory | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
create-release --owner string --repo string --tag string --sha string
func (m *myModule) example(ctx context.Context, owner string, repo string, tag string, sha string) {
return dag.
Github().
CreateRelease(ctx, owner, repo, tag, sha)
}
@function
async def example(owner: str, repo: str, tag: str, sha: str) -> None:
return await (
dag.github()
.create_release(owner, repo, tag, sha)
)
@func()
async example(owner: string, repo: string, tag: string, sha: string): Promise<void> {
return dag
.github()
.createRelease(owner, repo, tag, sha)
}
nextVersionFromAssociatedPrlabel() 🔗
NextVersionFromAssociatedPRLabel returns a the next semantic version based on the presence of a PR label for the given commit SHA. If there are multiple PRs associated with the commit, the label from the latest PR will be used.
i.e. if the SHA has an associated PR with a label of major
and the current tag is 1.1.2
the next version will be 2.0.0
if the PR has a tag of minor
and the current tag is 1.1.2
the next version will be 1.2.0
if the PR has a tag of patch
and the current tag is 1.1.2
the next version will be 1.1.3
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
owner | String ! | - | No description provided |
repo | String ! | - | No description provided |
sha | String ! | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
next-version-from-associated-prlabel --owner string --repo string --sha string
func (m *myModule) example(ctx context.Context, owner string, repo string, sha string) string {
return dag.
Github().
NextVersionFromAssociatedPrlabel(ctx, owner, repo, sha)
}
@function
async def example(owner: str, repo: str, sha: str) -> str:
return await (
dag.github()
.next_version_from_associated_prlabel(owner, repo, sha)
)
@func()
async example(owner: string, repo: string, sha: string): Promise<string> {
return dag
.github()
.nextVersionFromAssociatedPrlabel(owner, repo, sha)
}
getOidctoken() 🔗
GetOIDCToken returns an OpenID Connect (OIDC) token for the current run in GitHubActions
When a actions run has the id-token: write
permission, it can request an OIDC token for the current run
the parameters actionsRequestToken and actionsTokenURL are provided by the GitHubActions environment
variables ACTIONS_ID_TOKEN_REQUEST_TOKEN
and ACTIONS_ID_TOKEN_REQUEST_URL
.
example actions config to enable OIDC tokens: jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
actionsRequestToken | Secret ! | - | No description provided |
actionsTokenUrl | String ! | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
get-oidctoken --actions-request-token env:MYSECRET --actions-token-url string
func (m *myModule) example(ctx context.Context, actionsRequestToken *Secret, actionsTokenUrl string) string {
return dag.
Github().
GetOidctoken(ctx, actionsRequestToken, actionsTokenUrl)
}
@function
async def example(actions_request_token: dagger.Secret, actions_token_url: str) -> str:
return await (
dag.github()
.get_oidctoken(actions_request_token, actions_token_url)
)
@func()
async example(actionsRequestToken: Secret, actionsTokenUrl: string): Promise<string> {
return dag
.github()
.getOidctoken(actionsRequestToken, actionsTokenUrl)
}
commitFile() 🔗
CommitFile commits a file to a repository at the given path
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
owner | String ! | - | No description provided |
repo | String ! | - | No description provided |
commiterName | String ! | - | No description provided |
commiterEmail | String ! | - | No description provided |
commitPath | String ! | - | No description provided |
message | String ! | - | No description provided |
file | File ! | - | No description provided |
branch | String | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
commit-file --owner string --repo string --commiter-name string --commiter-email string --commit-path string --message string --file file:path
func (m *myModule) example(ctx context.Context, owner string, repo string, commiterName string, commiterEmail string, commitPath string, message string, file *File) string {
return dag.
Github().
CommitFile(ctx, owner, repo, commiterName, commiterEmail, commitPath, message, file)
}
@function
async def example(owner: str, repo: str, commiter_name: str, commiter_email: str, commit_path: str, message: str, file: dagger.File) -> str:
return await (
dag.github()
.commit_file(owner, repo, commiter_name, commiter_email, commit_path, message, file)
)
@func()
async example(owner: string, repo: string, commiterName: string, commiterEmail: string, commitPath: string, message: string, file: File): Promise<string> {
return dag
.github()
.commitFile(owner, repo, commiterName, commiterEmail, commitPath, message, file)
}
ftestCreateRelease() 🔗
example: dagger call ftest-create-release –token=GITHUB_TOKEN –files=./testfiles
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
files | Directory | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
ftest-create-release --token env:MYSECRET
func (m *myModule) example(ctx context.Context, token *Secret) {
return dag.
Github().
FtestCreateRelease(ctx, token)
}
@function
async def example(token: dagger.Secret) -> None:
return await (
dag.github()
.ftest_create_release(token)
)
@func()
async example(token: Secret): Promise<void> {
return dag
.github()
.ftestCreateRelease(token)
}
ftestBumpVersionWithPrtag() 🔗
example: dagger call ftest-bump-version-with-prtag –token=GITHUB_TOKEN
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
ftest-bump-version-with-prtag --token env:MYSECRET
func (m *myModule) example(ctx context.Context, token *Secret) string {
return dag.
Github().
FtestBumpVersionWithPrtag(ctx, token)
}
@function
async def example(token: dagger.Secret) -> str:
return await (
dag.github()
.ftest_bump_version_with_prtag(token)
)
@func()
async example(token: Secret): Promise<string> {
return dag
.github()
.ftestBumpVersionWithPrtag(token)
}
ftestCommitFile() 🔗
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
file | File ! | - | No description provided |
token | Secret ! | - | No description provided |
Example
dagger -m github.com/jumppad-labs/daggerverse/github@42f153b217184ebffddff6819063d86a129dacdc call \
ftest-commit-file --file file:path --token env:MYSECRET
func (m *myModule) example(ctx context.Context, file *File, token *Secret) string {
return dag.
Github().
FtestCommitFile(ctx, file, token)
}
@function
async def example(file: dagger.File, token: dagger.Secret) -> str:
return await (
dag.github()
.ftest_commit_file(file, token)
)
@func()
async example(file: File, token: Secret): Promise<string> {
return dag
.github()
.ftestCommitFile(file, token)
}