Closed jeankhawand closed 11 months ago
- name: Build Wazuh manager docker image uses: docker/build-push-action@v4 with: context: ./build-docker-images/wazuh-manager platforms: ${{ matrix.platform }} push: false buildkitd-flags: --debug outputs: type=tar,dest=/home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar build-args: | ARCH=$(uname -m) tags: | wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}
Input values in GitHub Actions are not evaluated within a Unix-like shell environment. You can set the value in a run
step for example using an env var like:
- name: Set the value
run: |
echo "ARCH=$(uname -m)" >> "$GITHUB_ENV"
Then you can use it like this:
build-args: |
ARCH=${{ env.ARCH }}
Or just:
build-args: |
ARCH
Also looking at this step, buildkitd-flags
is not a valid input for this action. I think you want to use it in the setup-buildx-action instead: https://github.com/docker/setup-buildx-action
Not sure why you want to pass the machine architecture to your Dockerfile though. You can just use one of the automatic platform ARGs in the global scope for this purpose. Suggest to read our docs about multi-platform image: https://docs.docker.com/build/building/multi-platform/
Contributing guidelines
I've found a bug, and:
Description
tried on my local to run the following command and I can see it working as expected
Expected behaviour
Actual behaviour
using the action I don't see
uname -m
evaluted https://github.com/jeankhawand/wazuh-docker/actions/runs/5931795158/job/16084421367?pr=1Repository URL
https://github.com/jeankhawand/wazuh-docker
Workflow run URL
https://github.com/jeankhawand/wazuh-docker/actions/runs/5931795158/job/16084421367?pr=1
YAML workflow
Workflow logs
No response
BuildKit logs
No response
Additional info
No response