Skip to content

Implement increased power consumption warning #3656

Implement increased power consumption warning

Implement increased power consumption warning #3656

---
name: Android - Check kotlin formatting
on:
pull_request:
paths: [.github/workflows/android-kotlin-format-check.yml, android/**/*.kt]
workflow_dispatch:
inputs:
override_container_image:
description: Override container image
type: string
required: false
permissions: {}
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use custom container image if specified
if: ${{ github.event.inputs.override_container_image != '' }}
run: echo "inner_container_image=${{ github.event.inputs.override_container_image }}"
>> $GITHUB_ENV
- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV
outputs:
container_image: ${{ env.inner_container_image }}
check-formatting:
needs: prepare
runs-on: ubuntu-latest
container:
image: ${{ needs.prepare.outputs.container_image }}
steps:
# Fix for HOME path overridden by GH runners when building in containers, see:
# https://github.com/actions/runner/issues/863
- name: Fix HOME path
run: echo "HOME=/root" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Run ktfmt check
run: android/gradlew -p android ktfmtCheck