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

Added appertize workflow for content repos #2200

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion .github/workflows/reusable-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Reuseable workflow to be called from content repos.
# Build and deploy app bundle for android
#
# Version : 1.0
# Version : 1.1
#
##################################################################################
# Configuration
Expand Down Expand Up @@ -35,11 +35,18 @@ concurrency:

on:
workflow_call:
inputs:
branch:
type: string
description: "Specify branch for deployment"
default: ""

jobs:

build_action:
uses: ./.github/workflows/reusable-app-build.yml
with:
branch: ${{ inputs.branch }}
secrets: inherit

build_android:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/reusable-appetize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
###################################################################################
# About
##################################################################################
# Reuseable workflow to be called from content repos.
# Appetize.io for labelled PRs
# Specifies deployment target based on pr target branch
# Must specify all below secrets and variables - see documentation for details
#
# Version : 1.0
#
##################################################################################
# Configuration
##################################################################################
name: Test Appetize
concurrency:
group: test-appetize-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
APPETIZE_TOKEN: ${{secrets.APPETIZE_TOKEN}}
APPETIZE_APP_KEY: ${{secrets.APPETIZE_APP_KEY}}


on:
workflow_call:

jobs:

build:
if: contains(github.event.pull_request.labels.*.name, 'Test - appetize')
uses: ./.github/workflows/reusable-android-build.yml
secrets: inherit
with:
branch: ${{ github.base_ref }}

test_appetize:
needs: build
runs-on: ubuntu-latest
outputs:
urls: ${{ steps.deploy.outputs.urls }}
steps:
- uses: actions/checkout@v3

- name: Download Build Artifact
uses: actions/download-artifact@v3
with:
name: debug_apk
path: ./

- name: Upload to Appetize.io
id: upload
uses: maxep/[email protected]
with:
api-token: ${{ env.APPETIZE_TOKEN }}
file-path: ${{ steps.download.outputs.download-path }}/app-debug.apk
platform: "android"
timeout: 30
# Include to overwrite existing app instead of creating new (will only allow single build at a time)
public-key: ${{env.APPETIZE_APP_KEY}}

- name: "Post to PR"
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
**Android Appetize URL**
${{ steps.upload.outputs.APPETIZE_APP_URL }}?device=pixel4&osVersion=12.0&scale=75
Loading