Skip to content

refactor: Replace Changelog Data Source #239

refactor: Replace Changelog Data Source

refactor: Replace Changelog Data Source #239

---
name: PR - Update dependency guard for Dependabot PRs
# Warning, this job is running on pull_request_target and therefore has access to issue content.
# Don't add any steps that act on external code.
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
branches:
- main
paths:
- '**/*.gradle'
- 'gradle/**'
- 'gradlew'
- '**/libs.versions.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number || 'no-pr' }}
cancel-in-progress: true
permissions:
contents: write
jobs:
pr-update-dependency-guard:
if: github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == 'thunderbird/thunderbird-android'
runs-on: ubuntu-latest
environment: botmobile
timeout-minutes: 90
steps:
- name: App Token Generate
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
client-id: ${{ vars.BOT_CLIENT_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout the repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token || github.token }}
- name: Setup Gradle environment
uses: ./.github/actions/setup-gradle
- name: Update dependency guard
run: ./gradlew dependencyGuardBaseline
- name: Commit and push changes if any
env:
APP_SLUG: ${{ steps.app-token.outputs.app-slug || 'github-actions'}}
APP_USER_ID: ${{ vars.BOT_USER_ID || '41898282' }}
run: |
set -x
git config --global user.name "${APP_SLUG}"
git config --global user.email "${APP_USER_ID}+${APP_SLUG}[bot]@users.noreply.github.com"
git add .
if ! git diff --cached --quiet; then
git config user.name
git config user.email
git status
git commit -m "chore(deps): Update dependency guard files on behalf of @dependabot"
git log -n 2
git push
else
echo "No changes to commit"
fi
set +x