@@ -12,6 +12,7 @@ This reusable GitHub Actions workflow automates the process of building a Docker
1212
1313| ** Input** | ** Description** | ** Required** | ** Default** |
1414| ------------------| -----------------------------------------------------| --------------| -----------------|
15+ | ** build-args** | Docker build arguments (multiline format: ` KEY1=value1\nKEY2=value2 ` ). | No | ` "" ` |
1516| ** dockerfile** | Path to Dockerfile. | No | ` Dockerfile ` |
1617| ** image_name** | Full image name (e.g. org/my-api). | Yes | - |
1718| ** image_tag** | Optional tag override (defaults to pushed Git tag). | No | - |
@@ -47,6 +48,7 @@ This reusable GitHub Actions workflow automates the process of building a Docker
4748- ** Depends On** : ` get-tag `
4849- ** Uses** : The docker-build workflow from the same repository.
4950- ** Inputs** :
51+ - Build arguments (optional)
5052 - Dockerfile path
5153 - Image name and tag
5254 - Push configuration (set to true)
@@ -65,10 +67,10 @@ This reusable GitHub Actions workflow automates the process of building a Docker
6567
6668## How to Use This Reusable Workflow 🔄
6769
68- 1 . ** Save the Workflow File**
70+ 1 . ** Save the Workflow File**
6971 This workflow is already saved as ` .github/workflows/deploy-docker.yml ` in the repository. 💾
7072
71- 2 . ** Call the Reusable Workflow**
73+ 2 . ** Call the Reusable Workflow**
7274 In another workflow file (e.g., triggered by a release), invoke this reusable workflow like so:
7375
7476 ``` yaml
@@ -81,6 +83,9 @@ This reusable GitHub Actions workflow automates the process of building a Docker
8183 deploy :
8284 uses : iExecBlockchainComputing/github-actions-workflows/.github/workflows/deploy-docker.yml@main
8385 with :
86+ build-args : |
87+ BUILD_VERSION=1.0.0
88+ NODE_ENV=production
8489 dockerfile : ' path/to/Dockerfile'
8590 image_name : ' your-org/your-app'
8691@@ -91,7 +96,7 @@ This reusable GitHub Actions workflow automates the process of building a Docker
9196 ssh_private_key : ${{ secrets.SSH_PRIVATE_KEY }}
9297 ` ` `
9398
94- 3. **Configure Secrets**
99+ 3. **Configure Secrets**
95100 Ensure that the following secrets are added to your repository's settings:
96101 - ` DOCKERHUB_USERNAME`: Your DockerHub username
97102 - `DOCKERHUB_PASSWORD` : Your DockerHub password or access token
0 commit comments