mirror of
https://github.com/logos-storage/github-actions.git
synced 2026-01-05 14:43:08 +00:00
docker_context support (#5)
This commit is contained in:
parent
6f77a131f6
commit
90ff516211
8
.github/workflows/docker-reusable.yml
vendored
8
.github/workflows/docker-reusable.yml
vendored
@ -9,6 +9,11 @@ on:
|
|||||||
description: Dockerfile
|
description: Dockerfile
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
docker_context:
|
||||||
|
default: .
|
||||||
|
description: Docker build context
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
dockerhub_repo:
|
dockerhub_repo:
|
||||||
default: codexstorage/test
|
default: codexstorage/test
|
||||||
description: DockerHub repository
|
description: DockerHub repository
|
||||||
@ -58,6 +63,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_FILE: ${{ inputs.docker_file }}
|
DOCKER_FILE: ${{ inputs.docker_file }}
|
||||||
|
DOCKER_CONTEXT: ${{ inputs.docker_context }}
|
||||||
DOCKERHUB_REPO: ${{ inputs.dockerhub_repo }}
|
DOCKERHUB_REPO: ${{ inputs.dockerhub_repo }}
|
||||||
BUILD_ARGS: ${{ inputs.build_args }}
|
BUILD_ARGS: ${{ inputs.build_args }}
|
||||||
TAG_LATEST: ${{ inputs.tag_latest }}
|
TAG_LATEST: ${{ inputs.tag_latest }}
|
||||||
@ -138,7 +144,7 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: ${{ env.DOCKER_FILE }}
|
||||||
file: ${{ env.DOCKER_FILE }}
|
file: ${{ env.DOCKER_FILE }}
|
||||||
platforms: ${{ env.PLATFORM }}
|
platforms: ${{ env.PLATFORM }}
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
| ---------------------- | ---------------------------------- | ------------------- |
|
| ---------------------- | ---------------------------------- | ------------------- |
|
||||||
| `docker_file` | Path to Dockerfile | `docker/Dockerfile` |
|
| `docker_file` | Path to Dockerfile | `docker/Dockerfile` |
|
||||||
|
| `docker_context` | Docker build context | `.` |
|
||||||
| `dockerhub_repo` | DockerHub repository | `codexstorage/test` |
|
| `dockerhub_repo` | DockerHub repository | `codexstorage/test` |
|
||||||
| `build_args` | Build arguments | `''` |
|
| `build_args` | Build arguments | `''` |
|
||||||
| `tag_latest` | Set latest tag for Docker images | `true` |
|
| `tag_latest` | Set latest tag for Docker images | `true` |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user