I’m trying to create a docker container action and followed the tutorial here and all went fine. I however want to use that action in a workflow that checkouts multiple repos and the problem i have is that the workspace mounted into the action docker image is the default checkout folder where the workflow exists. For example, i’ve been testing in this repo https://github.com/hbfernandes/actions which leads to the folowing volume being mounted.
Is there a way to change the mounts from the workflow definition or within the action definition? The working directory is not available for “use” actions and i can’t find anything about it in the documentation. I could of course workaround by checking stuff out into the “actions/actions” directory but that seems pretty dirty.
I will elaborate a bit more on the example so it becomes clearer.
I have a repo where i want to add a workflow to orchestrate a build of several projects in different repos. For this i’ll refer to it as workflow-repo. From a workflow in this repo i want to checkout project _ A _, _ B _ and _ C. _ After checking them out i want to run a custom docker container action that for the sake of simplicity is also in the _ workflow-repo. _This would look something like this:
jobs: build: runs-on: ubuntu-latest name: Multiple repo work steps: - name: Checkout current repo uses: actions/checkout@v1 - name: Checkout repo A uses: actions/checkout@v1 with: repository: org/a ref: master - name: Checkout repo B uses: actions/checkout@v1 with: repository: org/b ref: master - name: Checkout repo C uses: actions/checkout@v1 with: repository: org/c ref: master - name: Run Custom Docker Action uses: ./maven # local action with: args: clean
with this the checkouts would be performed on the these paths:
/home/runner/work/workflow-repo/workflow-repo /home/runner/work/workflow-repo/a /home/runner/work/workflow-repo/b /home/runner/work/workflow-repo/c
My issue is that when running the Docker action the workspace is mounted as a volume to the container using the first or these, the default checkout path.
This way i cannot reach the other checkouts from within the container. My question is if there is any way to control this mount.