github-repo-scaffolding-golang Plugin
This plugin depends on the following environment variable:
- GITHUB_TOKEN
Set it before using this plugin.
If you don’t know how to create this token, check out: - Creating a personal access token
1. If you run , the repo on GitHub will be completely removed.
2. If the Update
interface is called, the repo on github will be completely removed and recreated. However, given our current implementation, this interface shall not be called, as of in v0.2.0.
Please note that the owner
parameter is case-sensitive.
YOUR_GITHUB_USERNAME
YOUR_ORGANIZATION_NAME
YOUR_REPO_NAME
YOUR_DOCKERHUB_USERNAME
YOUR_DOCKERHUB_REPOSITORY
The “branch” in the example above is “main”, but you can adjust accordingly.
Currently, all the parameters in the example above are mandatory.
Outputs
This plugin has three outputs:
owner
repo
repoURL
(example: “https://github.com/IronCore864/test.git“)
---
plugin: github-repo-scaffolding-golang
options:
owner: YOUR_GITHUB_USERNAME
repo: YOUR_REPO_NAME
branch: main
image_repo: YOUR_DOCKERHUB_REPOSITORY
- name: golang-demo-actions
plugin: githubactions-golang
dependsOn: ["go-webapp-repo.github-repo-scaffolding-golang"]
options:
owner: ${{go-webapp-repo.github-repo-scaffolding-golang.outputs.owner}}
name: go
version: "1.17"
branch: main
build:
enable: True
test:
enable: True
coverage:
enable: True
docker:
enable: False
Pay attention to the ${{ xxx }}
part in the example. is the syntax for using an output.