Skip to content

Unable to clone outside of GITHUB_WORKSPACE directory #197

Open
@eabuslaiman30

Description

@eabuslaiman30

Hi Guys. I have a directory where the source code is located. I'm trying to create an action to:

  1. Pull the last code on that directory (example /home/my-code/src)
  2. Run npm install on that directory
  3. Run npm run build on that directory.

Anyway, I set the env var $GITHUB_WORKSPACE into my yml file, but it seems to be not respecting the directory where the code is cloned / pulled in.

My script:

name: Development Deploy

on:
  push:
    branches: [ develop ]

jobs:
  build:

    runs-on: self-hosted

    strategy:
      matrix:
        node-version: [10.10.0]
    steps:
      - name: Updating base code from develop
        uses: actions/checkout@v2
        with:
          ref: refs/heads/develop
          GITHUB_WORKSPACE: /home/my-code/src

    ... Another steps here

The log says the following:

Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
Syncing repository: repoowner/reponame
Working directory is '/etc/actions-runner/website/src/reponame'

Is there anyway I can use the existing directory to use the checkout action? I want this to be cloned on /home/my-code/src

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions