I am using workflow on GithubActions but getting the following error:
chmod: cannot access './gradlew': No such file or directory
Error: Process completed with exit code 1.
Following is my workflow.yml file
name: Android CI
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
I tried you change chmod command in a different way but non of execution succeed, but same workflow on my other project is working file i don't know whats the issue, Any help highly appreciated. Thanks
It's possible that you don't initialise wrapper.
You can try clone your repository from scratch and the exetuce ./gradlew build
command. If it's failed. Try use the
gradle wrapper
This command init your wrapper and you can see which files was generated and required for ./gradlew
Finally, You have two options:
gradle wrapper
locally and push required filesor
Add extra step to init wrapper during the workflow
...
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Init gradle wrapper
run: gradle wrapper
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build with Gradle wrapper
run: ./gradlew build
I have faced the same issue and I found someone change it to
and worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With