Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github.workspace points to actual workspace, not the volume act created #2408

Open
pimlie opened this issue Jul 28, 2024 · 0 comments
Open
Labels
kind/bug Something isn't working

Comments

@pimlie
Copy link

pimlie commented Jul 28, 2024

Bug report info

act version:            0.2.64
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock

Command used with act

act -j docker-run-test

Describe issue

When running the below workflow, then the new_dir created in step 2 is not available in the docker container of step 4 even though it should use the same workspace

This is a minimal test case, in reality I need to run a docker container that requires an --init hence why I'm using this workaround of calling docker run myself in a custom action.

Link to GitHub repository

No response

Workflow content

name: Test

on:
  pull_request:

jobs:
  docker-run-test:
    runs-on: ubuntu-latest
    steps:
    - name: 💾 Check out repository
      uses: actions/checkout@v3

    - name: Create dir
      run: |
        echo "PWD=$PWD"
        mkdir -p ./new_dir

    - name: Check dir exists
      run: |
        test -d ./new_dir

    - uses: addnab/docker-run-action@v3
      with:
        image: ubuntu:latest
        options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}
        run: |
          echo "PWD=$PWD"
          ls -laF
          test -d ./new_dir

Relevant log output

[Test/docker-run-test]   ❌  Failure - Main addnab/docker-run-action@v3

Additional information

GITHUB_WORKSPACE doesn't work either

@pimlie pimlie added the kind/bug Something isn't working label Jul 28, 2024
@pimlie pimlie changed the title github.workspace points to actual source code, not the volume act created github.workspace points to actual workspace, not the volume act created Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant