Skip to content

Update gh-aw lockfiles #4048

Update gh-aw lockfiles

Update gh-aw lockfiles #4048

name: Auto license report
on:
push:
branches:
- 'renovate/**/*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Free disk space
run: .github/scripts/gha-free-disk-space.sh
- name: Set up JDK for running Gradle
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
distribution: temurin
java-version-file: .java-version
- name: Set up gradle
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
with:
cache-read-only: true
- name: Update license report
run: ./gradlew generateLicenseReport --no-build-cache
- id: create-patch
name: Create patch file
run: |
git add -N --ignore-removal licenses
git diff > patch
if [ -s patch ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
fi
- name: Upload patch file
if: steps.create-patch.outputs.exists == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: patch
name: patch
# separate job is just to isolate the OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY usage a bit
apply:
runs-on: ubuntu-latest
needs: generate
steps:
- name: Download patch
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: ${{ runner.temp }}
- id: check-patch
name: Check patch
working-directory: ${{ runner.temp }}
run: |
if [ -f patch ]; then
echo "exists=true" >> $GITHUB_OUTPUT
fi
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: steps.check-patch.outputs.exists == 'true'
id: otelbot-token
with:
client-id: ${{ vars.OTELBOT_JAVA_INSTRUMENTATION_CLIENT_ID }}
private-key: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY }}
permission-contents: write
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
if: steps.check-patch.outputs.exists == 'true'
with:
token: ${{ steps.otelbot-token.outputs.token }}
# zizmor: ignore[artipacked] App credentials are required by the push below.
persist-credentials: true
- name: Use CLA approved bot
if: steps.check-patch.outputs.exists == 'true'
run: .github/scripts/use-cla-approved-bot.sh
- name: Apply patch and push
if: steps.check-patch.outputs.exists == 'true'
run: |
git apply "${{ runner.temp }}/patch"
git add licenses
git commit -m "Update license report"
git push