Skip to content

Bump tj-actions/branch-names from 4.8 to 7.0.7 in /.github/workflows #287

Bump tj-actions/branch-names from 4.8 to 7.0.7 in /.github/workflows

Bump tj-actions/branch-names from 4.8 to 7.0.7 in /.github/workflows #287

Workflow file for this run

# Build APKs for Kiwi Browser Next
name: 'Any branch: Build APK'
# Controls when the action will run. Triggers the workflow on pull request events or manual trigger
on:
pull_request:
branches:
- kiwi
workflow_dispatch:
concurrency: build_test_apk
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Building APK (if manually triggered)
if: github.event_name != 'pull_request'
run: curl --http1.0 --no-buffer -s 'http://longbuild.find.kiwi/build_apk.php?build_key=${{ secrets.BUILD_KEY }}&git_user=${{ github.repository_owner }}&git_repository=${{ github.event.repository.name }}&git_runid=${{ github.run_id }}&git_branch=${{ steps.branch-name.outputs.current_branch }}'
# Variables are from: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pullrequestevent
# and https://docs.github.com/en/rest/reference/pulls
- name: Building APK (if pull request)
if: github.event_name == 'pull_request'
run: curl --http1.0 --no-buffer -s 'http://longbuild.find.kiwi/build_apk.php?build_key=${{ secrets.BUILD_KEY }}&git_user=${{ github.event.pull_request.head.repo.owner.login }}&git_repository=${{ github.event.pull_request.head.repo.name }}&git_runid=${{ github.run_id }}&git_branch=${{ github.event.pull_request.head.ref }}'
- name: Downloading APK
if: github.event_name != 'pull_request'
run: wget -q 'https://build.find.kiwi/apks/${{ github.run_id }}/out.apk'
- name: Creating release
if: github.event_name != 'pull_request'
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}
release_name: Test build ${{ github.run_id }} initiated by ${{ github.actor }}
draft: true
prerelease: true
body: |
This is a test build initiated by ${{ github.actor }}.
- name: Uploading test apk (arm64)
if: github.event_name != 'pull_request'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out.apk
asset_name: ${{ github.repository_owner }}.${{ github.event.repository.name }}.${{ steps.branch-name.outputs.current_branch }}.${{ github.run_id }}-unofficial-arm64.apk
asset_content_type: application/vnd.android.package-archive
- name: Displaying download link
run: echo "Build can be downloaded at https://build.find.kiwi/apks/${{ github.run_id }}/out.apk"