Skip to content

Commit

Permalink
Add action to build APK using latest Kolibri release.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jan 18, 2024
1 parent daf7ef8 commit 3ba42db
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build APK for PRs

on:
pull_request:
branches:
- develop

jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths_ignore: '["**.po", "**.json"]'
latest_kolibri_release:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
outputs:
tar-url: ${{ steps.get_latest_kolibri_release.outputs.result }}}
steps:
- name: Get latest Kolibri release
id: get_latest_kolibri_release
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const { data: releases } = await github.rest.repos.listReleases({
owner: 'learningequality',
repo: 'kolibri',
per_page: 1,
page: 1,
});
const latestRelease = releases[0];
const tarAsset = latestRelease.assets.find(asset => asset.name.endsWith('.tar.gz'));
const tarUrl = tarAsset.browser_download_url;
return tarUrl;
build_apk:
name: Build Debug APK
needs: [pre_job, latest_kolibri_release]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/build_apk.yml
with:
tar-url: ${{ needs.latest_kolibri_release.outputs.tar-url }}

0 comments on commit 3ba42db

Please sign in to comment.