From 93934f785f033e63064f7af931d954a1a9764cf5 Mon Sep 17 00:00:00 2001 From: vodyanoysh Date: Wed, 22 Apr 2026 19:35:51 +0700 Subject: [PATCH] test --- .forgejo/workflows/docker-build.yml | 12 ++---------- README.md | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.forgejo/workflows/docker-build.yml b/.forgejo/workflows/docker-build.yml index 4a3b6a1..f42ae00 100644 --- a/.forgejo/workflows/docker-build.yml +++ b/.forgejo/workflows/docker-build.yml @@ -3,9 +3,6 @@ name: Reusable Docker Build on: workflow_call: inputs: - image_name: - required: true - type: string context: required: false type: string @@ -14,11 +11,6 @@ on: required: false type: string default: "./Dockerfile" - secrets: - REGISTRY_USERNAME: - required: true - REGISTRY_TOKEN: - required: true jobs: build: @@ -36,7 +28,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: git.vodyanoysh.ru/${{ inputs.image_name }} + images: git.vodyanoysh.ru/system/${{ github.repository }} tags: | type=ref,event=branch type=ref,event=pr @@ -58,4 +50,4 @@ jobs: file: ${{ inputs.dockerfile }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index fd877c6..aa315ed 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -usage: +## Usage + +In your project's `.forgejo/workflows/build.yml`: ```yaml name: Build @@ -13,7 +15,15 @@ on: jobs: docker-build: 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: REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} -``` \ No newline at end of file +``` + +### Available workflows + +| Workflow | Trigger | Inputs | Secrets | +|---|---|---|---| +| `docker-build.yml` | `workflow_call` | `image_name` (required), `context` (default `.`), `dockerfile` (default `./Dockerfile`) | `REGISTRY_USERNAME`, `REGISTRY_TOKEN` |