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

downloading a file by specifying the owner #17

Open
ryan5500 opened this issue Jun 9, 2021 · 0 comments
Open

downloading a file by specifying the owner #17

ryan5500 opened this issue Jun 9, 2021 · 0 comments

Comments

@ryan5500
Copy link

ryan5500 commented Jun 9, 2021

problem

When I download a folder from google drive using this action, the file owner is root:root.

I am running a test program in CI, which place new files in a downloaded folder by this action.
However, when program try to place new files, I've got Permission Denied because the owner of the downloaded folder is root:root.

As a workaround, I have added a process to change the owner of the folder after downloading the folder by action.
An example is shown below.

name: Test
on: [push]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python-version: [3.9]
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v2

      - name: Download test data from Google Drive
        uses: satackey/action-google-drive@v1
        with:
          skicka-tokencache-json: ${{ secrets.SKICKA_TOKENCACHE_JSON }}
          download-from: /test-data
          download-to: ${{ github.workspace }}/tests/files/test-data/
          google-client-id: ${{ secrets.GOOGLE_CLIENT_ID }}
          google-client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}

      - name: chown testdata dir (because satackey/action-google-drive@v1 downloads files as root owner)
        run: sudo chown -R runner:docker ${{ github.workspace }}/tests/files/test-data

suggestion

I would like to achieve simplicity in the description, preferably by specifying the user in the action.

For example, can we use the following option?

      - name: Download test data from Google Drive
        uses: satackey/action-google-drive@v1
        with:
          skicka-tokencache-json: ${{ secrets.SKICKA_TOKENCACHE_JSON }}
          download-from: /test-data
          download-to: ${{ github.workspace }}/tests/files/test-data/
          google-client-id: ${{ secrets.GOOGLE_CLIENT_ID }}
          google-client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}
          user: runner # added
          group: docker # added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant