Skip to content

Get Open Requests, Build and Push #747

Get Open Requests, Build and Push

Get Open Requests, Build and Push #747

Workflow file for this run

name: Get Open Requests, Build and Push
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
# push:
# branches: [ main ]
# paths:
# - 'data/pointers.json'
jobs:
build:
name: Get and Build
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
if: always()
- name: Check Out
id: check-out
uses: actions/checkout@v4
with:
token: ${{ secrets.PRIV_REPO_PAT }}
submodules: 'recursive'
- name: Set up JDK
id: setup-jdk
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Set up Python 3
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Grant execute permissions
id: grant-execute-permissions-for-scripts
run: chmod +x release/decrypt.sh release/clean.sh
- name: Decrypt Task
id: decrypt
run: ./release/decrypt.sh
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Grant execute permission for gradlew
id: grant-execute-permissions-for-gradle
run: chmod +x gradlew
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: run get-pending-requests.py
id: get-pending-requests
continue-on-error: true
run: python scripts/get-pending-requests.py
- name: Setup Gradle
id: setup-gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
- name: Build with Gradle
id: build
if: ${{ 'success' == steps.get-pending-requests.outcome }}
run: ./gradlew :app:assemble --stacktrace
env:
CI: true
GHTOKEN: ${{ secrets.PRIV_REPO_PAT }}
SIGN_KEY_PW: ${{ secrets.SIGN_KEY_PW }}
SIGN_STORE_PW: ${{ secrets.SIGN_STORE_PW }}
- name: Build RRO Apks
if: ${{ 'success' == steps.get-pending-requests.outcome }}
run: python scripts/build-rros.py
env:
SIGN_KEY_PW: ${{ secrets.SIGN_KEY_PW }}
SIGN_STORE_PW: ${{ secrets.SIGN_STORE_PW }}
- name: Commit to allusive-repo
if: ${{ 'success' == steps.get-pending-requests.outcome }}
working-directory: ./repo
run: |
git config --global user.name "afterroot-bot"
git config --global user.email "bot@afterroot.com"
git checkout main
echo "commit to allusive-repo"
git commit -m "Generated RRO Apks"
- name: Commit to allusive_rro
if: ${{ 'success' == steps.get-pending-requests.outcome }}
working-directory: ./
run: |
git add repo data/pointers.json
echo "commit to allusive_rro"
git commit -m "update request status in pointers.json"
- name: Push changes to allusive-repo
if: ${{ 'success' == steps.get-pending-requests.outcome }}
working-directory: ./repo
run: |
git push
- name: Push changes to allusive_rro
if: ${{ 'success' == steps.get-pending-requests.outcome }}
working-directory: ./
run: |
git push
- name: Clean Task
if: always()
run: ./release/clean.sh
- uses: act10ns/slack@v1
if: always()
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}