-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Labels
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug, and:
- The documentation does not mention anything about my problem
- There are no open or closed issues that are related to my problem
Description
#370 has broken example documentation from Docker on how one could use the metadata action in a larger workflow to build multi-platform images in GitHub Actions. Specifically, attempting to rename the temporary bake file generated by the metadata action in a follow-up step.
mv "${{ steps.meta.outputs.bake-file }}" "/tmp/bake-meta.json"
https://docs.docker.com/build/ci/github-actions/multi-platform/#with-bake
Attempting to do so now results in an action error like:
Run mv "cwd:///home/runner/work/_temp/docker-actions-toolkit-HBnX10/docker-metadata-action-bake.json" "/tmp/bake-meta.json"
mv: cannot stat 'cwd:///home/runner/work/_temp/docker-actions-toolkit-HBnX10/docker-metadata-action-bake.json': No such file or directory
Error: Process completed with exit code 1.
Expected behaviour
File is found and renamed.
Actual behaviour
File not found.
Repository URL
No response
Workflow run URL
No response
YAML workflow
name: 'Example'
on:
workflow_dispatch: ~
env:
REGISTRY_IMAGE: mydomain.com/registry/image
defaults:
run:
working-directory: ./
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.platforms.outputs.matrix }}
tag: ${{ steps.meta.outputs.tags }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Create matrix
id: platforms
run: |
echo "matrix=['linux/amd64','linux/arm64']" >>${GITHUB_OUTPUT}
-
name: Show matrix
run: |
echo ${{ steps.platforms.outputs.matrix }}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
flavor: |
latest=false
tags: |
type=raw,value=latest-dev
bake-target: image
-
name: Rename meta bake definition file
run: |
mv "${{ steps.meta.outputs.bake-file }}" "/tmp/bake-meta.json"
Workflow logs
No response
BuildKit logs
No response
Additional info
No response