"Unknown options: /" Error message
D-sense opened this issue · 5 comments
Hi.
I am getting this error message in my build, specifically at the point of using jakejarvis/s3-sync-action@master
:
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ***
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
AWS_REGION: us-east-1
SOURCE_DIR: bin/main
/usr/bin/docker run --name c488213b204a42648374365940a656f3_2515d7 --label 442333 --workdir /github/workspace --rm -e AWS_S3_BUCKET -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION -e SOURCE_DIR -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/backend-api-non-container/backend-api-non-container":"/github/workspace" 442333:c488213b204a42648374365940a656f3 --acl public-read --follow-symlinks --deleteUnknown options: /
This is the script I am using for the "build" job:
build:
name: Build
runs-on: ubuntu-lateststeps: - uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: '1.14.0' - name: Install dependencies run: | go version go get -u golang.org/x/lint/golint # checks out our code locally so we can work with the files - name: Run build run: go build -o bin/main
This is the script I am using for the "deploy" job:
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
steps:
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --exclude '.git/*'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'bin/main' # optional: defaults to entire repository
Thanks in advance!
I am getting the same error after attempting to build and deploy a react app:
jobs:
deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/production'
steps:
# Checkout the repo
- name: Checkout code
uses: actions/checkout@v2
# Use Node.js 12.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
# Install & Build
- name: Yarn Install
run: yarn install
- name: Yarn Build
run: NODE_ENV=production CI="" yarn build
# Deploy & Activate!
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_PRODUCTION_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-1"
SOURCE_DIR: "build"
- name: Invalidate Cloudfront
uses: awact/cloudfront-action@master
env:
SOURCE_PATH: './*'
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_PRODUCTION_ID }}
Similar error with the following:
- name: Upload non-html
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --include "*" --exclude "*.html"
env:
AWS_S3_BUCKET: 'canon-press'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'site/public'
Rather than the "/" in "Unknown options: /", it shows a comma separated list of all the folders in the root folder.
@SethThoburn always use ' '
in the args. Never use " "
. Not sure if it's this, but I had some issues using double quotes.
@SethThoburn always use
' '
in the args. Never use" "
. Not sure if it's this, but I had some issues using double quotes.
This fixed fixed the error for me 🤦🏼