Skip to content

Commit 7e1a060

Browse files
committed
updated readme
1 parent 6e622b1 commit 7e1a060

File tree

2 files changed

+136
-122
lines changed

2 files changed

+136
-122
lines changed

Diff for: README.md

+11-122
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,16 @@
1-
# Docker Build & Push GitHub Actions
1+
# Plane GitHub Actions
22

3-
## Build and Push Docker Image Action
3+
A collection of reusable GitHub Actions for Plane's CI/CD workflows.
44

5-
A reusable GitHub Action for building and pushing Docker images to both DockerHub and private registries. This action supports multi-platform builds using Docker Buildx and includes features for release management.
5+
## Available Actions
66

7-
### Features
7+
### [Docker Build & Push](./build-push)
8+
Build and push Docker images to DockerHub and private registries with support for:
9+
- Multi-platform builds using Docker Buildx
10+
- Smart tagging system for releases
11+
- Private registry support
12+
- Build arguments and more
813

9-
- 🔄 Multi-platform builds using Docker Buildx
10-
- 🏷️ Smart tagging system for releases and branches
11-
- 🔐 Support for both DockerHub and private registries
12-
- 📦 Build arguments support
13-
- 🚀 Release management with semantic versioning
14+
## Usage
1415

15-
### Usage
16-
17-
```yaml
18-
- name: Build and Push Docker Image
19-
uses: makeplane/actions/[email protected]
20-
with:
21-
# Required Parameters
22-
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
23-
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
24-
docker-image-owner: your-org-name
25-
docker-image-name: your-image-name
26-
dockerfile-path: ./Dockerfile
27-
28-
# Optional Parameters with defaults
29-
build-context: "."
30-
buildx-driver: "docker-container"
31-
buildx-version: "latest"
32-
buildx-platforms: "linux/amd64"
33-
buildx-endpoint: "default"
34-
```
35-
36-
### Inputs
37-
38-
#### Authentication
39-
| Input | Description | Required | Default |
40-
|-------|-------------|----------|---------|
41-
| `dockerhub-username` | DockerHub username | Yes | - |
42-
| `dockerhub-token` | DockerHub token | Yes | - |
43-
44-
#### Private Registry Options
45-
| Input | Description | Required | Default |
46-
|-------|-------------|----------|---------|
47-
| `private-registry-push` | Enable push to private registry | No | `"false"` |
48-
| `private-registry-username` | Private registry username | No | `""` |
49-
| `private-registry-token` | Private registry token | No | `""` |
50-
| `private-registry-addr` | Private registry address | No | `"registry.plane.tools"` |
51-
| `private-registry-project` | Private registry project | No | `"plane"` |
52-
53-
#### Docker Image Options
54-
| Input | Description | Required | Default |
55-
|-------|-------------|----------|---------|
56-
| `docker-image-owner` | Docker image owner/organization | Yes | - |
57-
| `docker-image-name` | Docker image name | Yes | - |
58-
| `build-context` | Build context path | No | `"."` |
59-
| `dockerfile-path` | Path to Dockerfile | Yes | - |
60-
| `build-args` | Build arguments | No | `""` |
61-
62-
#### Buildx Options
63-
| Input | Description | Required | Default |
64-
|-------|-------------|----------|---------|
65-
| `buildx-driver` | Buildx driver | No | `"docker-container"` |
66-
| `buildx-version` | Buildx version | No | `"latest"` |
67-
| `buildx-platforms` | Build platforms | No | `"linux/amd64"` |
68-
| `buildx-endpoint` | Buildx endpoint | No | `"default"` |
69-
70-
#### Release Options
71-
| Input | Description | Required | Default |
72-
|-------|-------------|----------|---------|
73-
| `build-release` | Enable release build | No | `"false"` |
74-
| `build-prerelease` | Mark as pre-release | No | `"false"` |
75-
| `release-version` | Release version | No | `"latest"` |
76-
77-
### Tag Generation
78-
79-
The action automatically generates Docker image tags based on the following rules:
80-
81-
1. **Release Build** (`build-release: true`):
82-
- Uses semantic versioning (e.g., v1.2.3)
83-
- Adds `:stable` tag for non-pre-releases
84-
- Validates version format using regex
85-
86-
2. **Master Branch**:
87-
- Tags as `:latest`
88-
89-
3. **Other Branches**:
90-
- Uses sanitized branch name as tag
91-
92-
### Example Workflows
93-
94-
#### Basic Usage
95-
```yaml
96-
jobs:
97-
build:
98-
runs-on: ubuntu-latest
99-
steps:
100-
- name: Build and Push
101-
uses: makeplane/actions/[email protected]
102-
with:
103-
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
104-
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
105-
docker-image-owner: myorg
106-
docker-image-name: myapp
107-
dockerfile-path: ./Dockerfile
108-
```
109-
110-
#### Multi-Platform Release Build
111-
```yaml
112-
jobs:
113-
release:
114-
runs-on: ubuntu-latest
115-
steps:
116-
- name: Build and Push Release
117-
uses: makeplane/actions/[email protected]
118-
with:
119-
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
120-
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
121-
docker-image-owner: myorg
122-
docker-image-name: myapp
123-
dockerfile-path: ./Dockerfile
124-
build-release: "true"
125-
release-version: "v1.0.0"
126-
buildx-platforms: "linux/amd64,linux/arm64"
127-
```
16+
Each action has its own README with detailed documentation and examples. Click the links above to learn more about specific actions.

Diff for: build-push/README.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Docker Build & Push GitHub Action
2+
3+
A reusable GitHub Action for building and pushing Docker images to both DockerHub and private registries. This action supports multi-platform builds using Docker Buildx and includes features for release management.
4+
5+
### Features
6+
7+
- 🔄 Multi-platform builds using Docker Buildx
8+
- 🏷️ Smart tagging system for releases and branches
9+
- 🔐 Support for both DockerHub and private registries
10+
- 📦 Build arguments support
11+
- 🚀 Release management with semantic versioning
12+
13+
### Usage
14+
15+
```yaml
16+
- name: Build and Push Docker Image
17+
uses: makeplane/actions/[email protected]
18+
with:
19+
# Required Parameters
20+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
22+
docker-image-owner: your-org-name
23+
docker-image-name: your-image-name
24+
dockerfile-path: ./Dockerfile
25+
26+
# Optional Parameters with defaults
27+
build-context: "."
28+
buildx-driver: "docker-container"
29+
buildx-version: "latest"
30+
buildx-platforms: "linux/amd64"
31+
buildx-endpoint: "default"
32+
```
33+
34+
### Inputs
35+
36+
#### Authentication
37+
| Input | Description | Required | Default |
38+
|-------|-------------|----------|---------|
39+
| `dockerhub-username` | DockerHub username | Yes | - |
40+
| `dockerhub-token` | DockerHub token | Yes | - |
41+
42+
#### Private Registry Options
43+
| Input | Description | Required | Default |
44+
|-------|-------------|----------|---------|
45+
| `private-registry-push` | Enable push to private registry | No | `"false"` |
46+
| `private-registry-username` | Private registry username | No | `""` |
47+
| `private-registry-token` | Private registry token | No | `""` |
48+
| `private-registry-addr` | Private registry address | No | `"registry.plane.tools"` |
49+
| `private-registry-project` | Private registry project | No | `"plane"` |
50+
51+
#### Docker Image Options
52+
| Input | Description | Required | Default |
53+
|-------|-------------|----------|---------|
54+
| `docker-image-owner` | Docker image owner/organization | Yes | - |
55+
| `docker-image-name` | Docker image name | Yes | - |
56+
| `build-context` | Build context path | No | `"."` |
57+
| `dockerfile-path` | Path to Dockerfile | Yes | - |
58+
| `build-args` | Build arguments | No | `""` |
59+
60+
#### Buildx Options
61+
| Input | Description | Required | Default |
62+
|-------|-------------|----------|---------|
63+
| `buildx-driver` | Buildx driver | No | `"docker-container"` |
64+
| `buildx-version` | Buildx version | No | `"latest"` |
65+
| `buildx-platforms` | Build platforms | No | `"linux/amd64"` |
66+
| `buildx-endpoint` | Buildx endpoint | No | `"default"` |
67+
68+
#### Release Options
69+
| Input | Description | Required | Default |
70+
|-------|-------------|----------|---------|
71+
| `build-release` | Enable release build | No | `"false"` |
72+
| `build-prerelease` | Mark as pre-release | No | `"false"` |
73+
| `release-version` | Release version | No | `"latest"` |
74+
75+
### Tag Generation
76+
77+
The action automatically generates Docker image tags based on the following rules:
78+
79+
1. **Release Build** (`build-release: true`):
80+
- Uses semantic versioning (e.g., v1.2.3)
81+
- Adds `:stable` tag for non-pre-releases
82+
- Validates version format using regex
83+
84+
2. **Master Branch**:
85+
- Tags as `:latest`
86+
87+
3. **Other Branches**:
88+
- Uses sanitized branch name as tag
89+
90+
### Example Workflows
91+
92+
#### Basic Usage
93+
```yaml
94+
jobs:
95+
build:
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: Build and Push
99+
uses: makeplane/actions/[email protected]
100+
with:
101+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
102+
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
103+
docker-image-owner: myorg
104+
docker-image-name: myapp
105+
dockerfile-path: ./Dockerfile
106+
```
107+
108+
#### Multi-Platform Release Build
109+
```yaml
110+
jobs:
111+
release:
112+
runs-on: ubuntu-latest
113+
steps:
114+
- name: Build and Push Release
115+
uses: makeplane/actions/[email protected]
116+
with:
117+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
118+
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
119+
docker-image-owner: myorg
120+
docker-image-name: myapp
121+
dockerfile-path: ./Dockerfile
122+
build-release: "true"
123+
release-version: "v1.0.0"
124+
buildx-platforms: "linux/amd64,linux/arm64"
125+
```

0 commit comments

Comments
 (0)