Skip to content

Pin GitHub Actions to full-length commit SHAs #4579

Pin GitHub Actions to full-length commit SHAs

Pin GitHub Actions to full-length commit SHAs #4579

Workflow file for this run

name: "Checks the SDK only using APIs from the targeted API level"
on:
workflow_dispatch:
push:
branches: [main, support/2.x.x]
pull_request:
branches: [main, support/2.x.x]
jobs:
lint-api-level:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@40fd30fb8d7440372e1316f5d1809ec01dcd3699 # v4.0.1
- name: Add execution right to the script
run: chmod +x gradlew
working-directory: ./android
- name: Build SDK with Android project configuration
id: lint
run: ./gradlew --no-daemon build
working-directory: ./android
- name: Upload linting results
if: failure() && steps.lint.outcome == 'failure'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: lint-report
path: ./android/build/reports