Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GitHub Actions #4059

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build Pull Requests

on:
pull_request:
branches: # we might want to add all branches here
- 'master'
- 'dev'

jobs:
build:
name: Build project & generate APK
runs-on: ubuntu-18.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use ubuntu instead?

steps:
- uses: actions/checkout@v1

- name: set up JDK 1.8
uses: actions/setup-java@v1.4.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to v1.4.3.
v.1.4.0 uses the vulnerable set-env command.

with:
java-version: 1.8

- name: Build debug APK
run: bash ./gradlew assembleDebug --stacktrace

- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app
path: app/build/outputs/apk/debug/*.apk

- name: Create comment linking to the artifact
uses: thollander/actions-comment-pull-request@1f25fabed60c3f141743c3a522529950a8fb2191
with:
message: 'The APK was build successfuly. You can find it here: https://github.com/TobiGr/NewPipe/actions/runs/${{github.run_id}}'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be changed

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}