'Github workflow action not showing
I am adding CI to my Android application using github actions. The problem is I am not able to view it under actions tab.
My android.yml file looks like this:
name: Android CI
on:
push:
branches: [ ci ]
pull_request:
branches: [ ci ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
Solution 1:[1]
Not sure if this is due to formatting on SO or not, but in your YAML the properties runs-on and steps under your build job are not indented.
If this is the case, it would be incorrect. Those properties should be nested under the build job object, so it should be:
jobs:
build:
runs-on: ubuntu-latest
steps:
- ....
Also, make sure this file is placed under <repo-root>/.github/workflows/
Side note: I already put it as a comment, but let me reiterate for visibility. Please don't set the executable flag on gradlew on every build in the CI config. Instead, fix the problem at the root and actually commit this executable flag in the repo, so everyone that clones the repo has a proper exec flag too (not just the CI). You can do this with git update-index --chmod=+x gradlew, and then commit.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
