33> [ !IMPORTANT]
44> This CI repository is meant for internal usage within the CTFPilot organization.
55
6- This repository contains Continuous intergration automation, in the forms of Github Action workflows.
6+ This repository contains Continuous intergration automation, in the forms of GitHub Action workflows.
77
88## How to use
99
2020 permissions :
2121 <permissions>
2222 name : <name>
23- uses : ctfpilot/ci/.github/workflows/<workflow>@<version>
23+ uses : ctfpilot/ci/.github/workflows/<workflow>.yml @<version>
2424 with :
2525 <inputs>
2626` ` `
@@ -29,16 +29,19 @@ jobs:
2929
3030- [` cla-assistant`](#cla-assistant): CLA Assistant bot
3131- [`release`](#release): Release system
32+ - [`docker`](#docker): Docker build and push system
3233
3334# ## CLA Assistant
3435
35- This workflow contains the CLA Assistant bot used througout CTF Pilot.
36+ This workflow contains the CLA Assistant bot used throughout CTF Pilot.
3637
3738It is setup to contain sensible defaults, but requires the `repository` input to be specified.
3839
40+ The workflow can only be run within the `ctfpilot` organization.
41+
3942# ### Inputs
4043
41- - `repository` : The repository that the CLA is generated for
44+ - `repository` : The repository that the CLA is generated for. Example `hello-world`.
4245- `version` : CLA version. Keep default to use organization default.
4346- `CLASHA` : The SHA for the commit, the CLA version is. Keep default to use organization default.
4447
@@ -65,20 +68,21 @@ jobs:
6568 pull-requests: write
6669 statuses: write
6770 name: "CLA Assistant"
68- uses: ctfpilot/ci/.github/workflows/cla-assistant@<version>
71+ uses: ctfpilot/ci/.github/workflows/cla-assistant.yml@<version>
72+ secrets: inherit
6973 with:
7074 repository: <repository>
7175` ` `
7276
7377# ## Release
7478
75- This workflow contains the release system used througout CTF Pilot.
79+ This workflow contains the release system used throughout CTF Pilot.
7680
77- The wofklow requires the `repository` input to be specified.
81+ The workflow requires the `repository` input to be specified.
7882
7983# ### Inputs
8084
81- - `repository` : The repository that the CLA is generated for
85+ - `repository` : Allowed repository for workflow to run in. Example `ctfpilot/hello-world`.
8286- `ENVIRONMENT` : The environment to deploy to.
8387
8488# ### Secrets
@@ -108,7 +112,55 @@ jobs:
108112 packages: write
109113 id-token: write
110114 name: "Release"
111- uses: ctfpilot/ci/.github/workflows/release@<version>
115+ uses: ctfpilot/ci/.github/workflows/release.yml@<version>
116+ with:
117+ repository: <repository>
118+ ` ` `
119+
120+ # ## Docker
121+
122+ This workflow contains the Docker build and push system used throughout CTF Pilot.
123+
124+ The workflow requires the `repository` input to be specified.
125+
126+ # ### Inputs
127+
128+ - `repository` : Allowed repository for workflow to run in. Example `ctfpilot/hello-world`.
129+ - `dockerfile` : Dockerfile path.
130+ - `context` : Build context.
131+ - `arguments` : Build arguments. List of key-value pairs.
132+ - `semver` : Semantic version. Leave empty to not use semantic versioning.
133+ - `tags` : List of tags to apply to the image. Required if you do not use semantic versioning.
134+ - `registry` : Registry for docker image to use. Defaults to GitHub container registry.
135+ - `image_name` : Docker image name to use. Defaults to repository name.
136+ - `registry_username` : Username to use for registry login. Defaults to GitHub actor.
137+ - `registry_token` : Token to use for registry login. Defaults to GITHUB_TOKEN.
138+ - `fetch_submodules` : Fetch submodules. Defaults to true.
139+ - `platforms` : Platforms to build for (comma separated, e.g., linux/amd64,linux/arm64).
140+ - `runner` : Runner to use for the job. Defaults to ubuntu-latest
141+ - `cacheFrom` : Cache type from
142+ - `cacheTo` : Cache type to
143+ - `commit` : Commit SHA to use for git operations and tagging. Defaults to github.sha.
144+
145+ # ### How to use
146+
147+ ` ` ` yml
148+ name: "Docker build and push"
149+
150+ on:
151+ push:
152+ branches:
153+ - main
154+ - develop
155+
156+ jobs:
157+ CLAAssistant:
158+ permissions:
159+ contents: read
160+ packages: write
161+ id-token: write
162+ name: "Docker build and push"
163+ uses: ctfpilot/ci/.github/workflows/docker.yml@<version>
112164 with:
113165 repository: <repository>
114166` ` `
0 commit comments