I have this github action : on: push: branches: [feature/lint-update, manu] name:…
- User
I have this github action :
on: push: branches: [feature/lint-update, manu]
name: cppcheck-action
jobs: build: name: cppcheck runs-on: ubuntu-latest steps: - name: Create Report folder run: | mkdir -p ./lint-reports
- uses: actions/checkout@v2 - name: cppcheck uses: deep5050/cppcheck-action@main with: github_token: ${{ secrets.GITHUB_TOKEN}} # exclude_check: inline_suppression: enable output_file: ./cppcheck_report.txt - name: publish report uses: mikeal/publish-to-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: 'feature/lint-update' # your branch name goes hereThis works fine. However, when I try to change the output file to be in a directory (./lint-reports/cppcheck_report.txt). The file does not get created, and doesn't get pushed either. Please fix it.
- Assistant
The issue might be related to the working directory not being set to the root of the repository. In the
publish reportstep, try specifying the working directory explicitly by adding awithsection that indicates thepathfor the GitHub action to run:on: push: branches: [feature/lint-update, manu] name: cppcheck-action jobs: build: name: cppcheck runs-on: ubuntu-latest steps: - name: Create Report folder run: | mkdir -p ./lint-reports - uses: actions/checkout@v2 - name: cppcheck uses: deep5050/cppcheck-action@main with: github_token: ${{ secrets.GITHUB_TOKEN}} # exclude_check: inline_suppression: enable output_file: ./lint-reports/cppcheck_report.txt - name: publish report uses: mikeal/publish-to-github-action@master with: path: ./lint-reports env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: 'feature/lint-update' # your branch name goes hereThis way, the action will know where to create and push the
cppcheck_report.txtfile.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.