test
This commit is contained in:
parent
1b6ef06d21
commit
93934f785f
2 changed files with 14 additions and 12 deletions
|
|
@ -3,9 +3,6 @@ name: Reusable Docker Build
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
image_name:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
context:
|
context:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -14,11 +11,6 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: "./Dockerfile"
|
default: "./Dockerfile"
|
||||||
secrets:
|
|
||||||
REGISTRY_USERNAME:
|
|
||||||
required: true
|
|
||||||
REGISTRY_TOKEN:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -36,7 +28,7 @@ jobs:
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: git.vodyanoysh.ru/${{ inputs.image_name }}
|
images: git.vodyanoysh.ru/system/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
usage:
|
## Usage
|
||||||
|
|
||||||
|
In your project's `.forgejo/workflows/build.yml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Build
|
name: Build
|
||||||
|
|
@ -13,7 +15,15 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
docker-build:
|
docker-build:
|
||||||
uses: vodyanoy/ci-workflows/.forgejo/workflows/docker-build.yml@master
|
uses: vodyanoy/ci-workflows/.forgejo/workflows/docker-build.yml@master
|
||||||
|
with:
|
||||||
|
image_name: vodyanoy/your-project # required: org/repo as it appears in the registry
|
||||||
secrets:
|
secrets:
|
||||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Available workflows
|
||||||
|
|
||||||
|
| Workflow | Trigger | Inputs | Secrets |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `docker-build.yml` | `workflow_call` | `image_name` (required), `context` (default `.`), `dockerfile` (default `./Dockerfile`) | `REGISTRY_USERNAME`, `REGISTRY_TOKEN` |
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue