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

Action does not handle inverted folders well #339

Open
velddev opened this issue Aug 22, 2023 · 1 comment
Open

Action does not handle inverted folders well #339

velddev opened this issue Aug 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@velddev
Copy link

velddev commented Aug 22, 2023

TL;DR

When running gcloud meta list-files-for-upload with the current .gcloudignore i get the following result:

# Ignore everything
*

# Except the Cloud Function files we want to deploy
!/assets/**
!/build/**
!*.html
index.html
assets\my-style.css
build\index.js

However, gcloud only uploads the specific file "index.html"

Expected behavior

For gcloud meta list-files-for-upload to confidently show me what files I will be uploading regardless of implementation

Observed behavior

Inconsistent behavior

Action YAML

name: Build

jobs:
  test:
    name: Upload App
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3
        with:
          lfs: true

      - id: 'auth'
        name: 'Authenticate to Google Cloud'
        uses: 'google-github-actions/auth@v1'
        with:
          credentials_json: '${{ secrets.MY_GITHUB_KEY }}'

      - name: Install Node Modules
        run: yarn install --frozen-lockfile

      - name: Run esbuild
        run: yarn build:prod

      - id: 'upload-file'
        uses: 'google-github-actions/upload-cloud-storage@v1'
        with:
          path: '.'
          destination: 'my-app/${{ github.head_ref || github.ref_name }}'
          parent: false

Log output

It shows build/index.js is there, but is ignored by the ignorefile.

Additional information

No response

@velddev velddev added the bug Something isn't working label Aug 22, 2023
@sethvargo
Copy link
Member

Hi there - could you please provide the debug output for the complete GitHub Actions workflow run?

Does running the raw gcloud storage objects cp or gsutil work as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants