Skip to content

No such file error in actions when a file was removed in the PR #806

@kaankoken

Description

@kaankoken

I am running typos in GH action in my iOS project on a private repository. I have no problem while running locally.

  spell-check:
    name: Spell Check with Typos
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Check spelling with typos
        uses: crate-ci/typos@master
        with:
          config: ./config/_typos.toml
gh action debug
##[debug]Evaluating condition for step: 'Check spelling with typos'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Check spelling with typos
##[debug]Loading inputs
##[debug]Loading env
Run crate-ci/typos@master
##[debug]Evaluating: inputs.files
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'files'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.extend_identifiers
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'extend_identifiers'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.extend_words
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'extend_words'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.isolated
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'isolated'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.write_changes
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'write_changes'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.config
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'config'
##[debug]=> './config/_typos.toml'
##[debug]Result: './config/_typos.toml'
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Loading env
Run $GITHUB_ACTION_PATH/action/entrypoint.sh
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/481e3597-[2](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:2)66c-4dd6-a798-f4618[3](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:3)b63820.sh
9[4](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:4)f90d277b9b63117b644[5](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:5)9[6](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:6)efe391a191894530
Limiting checks to dev...HEAD
Downloading 'typos' v1.16.5
--2023-08-1[7](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:7) 0[8](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:8):5[9](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:9):34--  https://github.com/crate-ci/typos/releases/download/v1.16.5/typos-v1.16.5-x86_64-unknown-linux-musl.tar.gz
Resolving github.com (github.com)... [14](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:15)0.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/181782286/09f789e7-fa07-4987-a0a1-05e2b82e6943?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230817%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230817T085935Z&X-Amz-Expires=300&X-Amz-Signature=9f291e6625e49f2224bb2fc07e93c2448c72ac890085674fb7db972a95374ed1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=181782286&response-content-disposition=attachment%3B%20filename%3Dtypos-v1.[16](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:17).5-x86_64-unknown-linux-musl.tar.gz&response-content-type=application%2Foctet-stream [following]
--2023-08-[17](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:18) 08:59:35--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/[18](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:19)1782286/09f789e7-fa07-4987-a0a1-05e2b82e6943?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230817%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230817T085935Z&X-Amz-Expires=300&X-Amz-Signature=9f291e6625e49f2224bb2fc07e93c2448c72ac890085674fb7db972a95374ed1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=181782286&response-content-disposition=attachment%3B%20filename%3Dtypos-v1.16.5-x86_64-unknown-linux-musl.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.[19](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:20)9.110.133, 185.199.111.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... [20](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:21)0 OK
Length: 6509062 (6.2M) [application/octet-stream]
Saving to: ‘typos-v1.16.5-x86_64-unknown-linux-musl.tar.gz’

     0K ........ ........ ........ ........ ........ ........ 48% 35.5M 0s
  3072K ........ ........ ........ ........ ........ ........ 96%  166M 0s
  6144K ...                                                  100%  310M=0.1s

20[23](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:24)-08-17 08:59:[35](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:36) (60.1 MB/s) - ‘typos-v1.16.5-x86_64-unknown-linux-musl.tar.gz’ saved [6[50](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:51)90[62](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:63)/6509062]

./typos
jq: jq-1.6
$ ./typos Gain.xcodeproj/project.pbxproj
Gain.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Gain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Gain.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Gain/Assets.xcassets/AccentColor.colorset/Contents.json
Gain/Assets.xcassets/AppIcon.appiconset/Contents.json
Gain/Assets.xcassets/Contents.json
Gain/ContentView.swift
Gain/GainApp.swift
Gain/Preview Content/Preview Assets.xcassets/Contents.json
GainTests/GainTests.swift
GainUITests/GainUITests.swift
GainUITests/GainUITestsLaunchTests.swift --config ./config/_typos.toml
No such file or directory (os error 2)
No such file or directory (os error 2)
Error: Process completed with exit code [64](https://github.com/gain-medya/iOS/actions/runs/5888717241/job/15970931021#step:3:65).
##[debug]Finished: run
##[debug]Finishing: Check spelling with typos

I also suspect that the relative path might be the problem but it did not solve it.

 spell-check:
    name: Spell Check with Typos
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Create config path
        run: |
          echo "config=${{ github.workspace }}/config/_typos.toml" >> GITHUB_ENV

      - name: Check spelling with typos
        uses: crate-ci/typos@master
        with:
          config: ${{ env.config }}

_typos.toml

# URL -> https://github.com/crate-ci/typos

[default.extend-identifiers]

[default.extend-words]
commitlint = "commitlint"
conventionalcommits = "conventionalcommits"
[files]
extend-exclude = [
  "**/.vscode/**/",
  "**/*.json",
  "_typos.toml",
  "cspell.config.yaml",
  "**/*.xcodeproj/",
  "**/*.xcworkspace/",
  "**/*.xcassets/",
  "**/*pbxproj",
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions