Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

cdk synth command should not require a GITHUB_TOKEN #61

@zaro0508

Description

@zaro0508

I'm getting this error message that says i need a package.json file when attempting to run synth however I'm have a python project and i've already have a requirements.txt file containing the needed dependencies. I'm not sure why i need a package.json

Run youyo/aws-cdk-github-actions@v2
/usr/bin/docker run --name c3c9fab9b5f6b455f82604107fe244452_754adf --label 49859c --workdir /github/workspace --rm -e 
..
..
"/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/data_curator-infra/data_curator-infra":"/github/workspace" 49859c:3c9fab9b5f6b455f82604107fe244452
npm WARN saveError ENOENT: no such file or directory, open '/github/workspace/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/github/workspace/package.json'
npm WARN workspace No description
npm WARN workspace No repository field.
npm WARN workspace No README data
npm WARN workspace No license field.

+ [email protected]
added 1 package from 1 contributor and audited 1 package in 1.949s
found 0 vulnerabilities

Install aws-cdk latest
Successful install aws-cdk latest
Install requirements.txt
Successful install requirements.txt
Run cdk synth  "*"
Successfully synthesized to /github/workspace/cdk.out
Supply a stack id (dca-common, dca-test-DockerFargateStack) to display its template.

/entrypoint.sh: line 95: GITHUB_TOKEN: unbound variable

➜ tree

.
├── README.md
├── app.py
├── cdk.json
├── common
│   ├── __init__.py
│   └── vpc_stack.py
├── config.py
├── docker_fargate
│   ├── __init__.py
│   └── docker_fargate_stack.py
├── helpers.py
├── requirements-dev.txt
├── requirements.txt

➜ cat requirements.txt

aws-cdk-lib==2.60.0
constructs>=10.0.0,<11.0.0

my GH action jobs..

jobs:
  pre-commit:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Static Analysis
        uses: pre-commit/[email protected]

      - name: Install dependencies
        run: pip install -r requirements.txt -r requirements-dev.txt

      - name: cdk synth
        uses: youyo/aws-cdk-github-actions@v2
        with:
          cdk_subcommand: 'synth'
        env:
          DOCKER_IMAGE: ${{ env.IMAGE_PATH_AND_TAG }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions