I'm encountering an issue with the docker/build-push-action GitHub Action when using the ulimit option. If the ulimit option is set to its default value [], the action fails with an error. This behavior is problematic when using this action in a reusable workflow template that must accommodate different requirements across various use cases.
Steps to Reproduce:
Set up a GitHub Actions workflow using the docker/build-push-action@v6.
Define the ulimit option as default (ulimit: []).
Run the workflow.
Expected Behavior:
The workflow should successfully build and push the Docker image without errors when the ulimit option is set to its default value [].
Actual Behavior:
The workflow fails with an error related to the ulimit option when it is set to [].
Example Workflow:
name: Build and Push Docker Image
on:
workflow_call:
inputs:
ulimit:
required: false
type: string
default: "[]"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: user/repo:latest
ulimit: ${{ inputs.ulimit }} # This causes the error
Description
I'm encountering an issue with the docker/build-push-action GitHub Action when using the ulimit option. If the ulimit option is set to its default value [], the action fails with an error. This behavior is problematic when using this action in a reusable workflow template that must accommodate different requirements across various use cases.
Steps to Reproduce:
Set up a GitHub Actions workflow using the docker/build-push-action@v6.
Define the ulimit option as default (ulimit: []).
Run the workflow.
Expected Behavior: The workflow should successfully build and push the Docker image without errors when the ulimit option is set to its default value [].
Actual Behavior: The workflow fails with an error related to the ulimit option when it is set to [].
Example Workflow:
Additional Information: