Build(deps): Bump com.google.firebase.firebase-perf from 2.0.0 to 2.0.1 #131
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MT Dependency update baseline | |
on: | |
workflow_dispatch: # manual | |
pull_request: | |
paths: | |
- 'gradle/libs.versions.toml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.head_ref }} | |
cancel-in-progress: true | |
# Dependenbot triggered Pull Request have their own secrets: | |
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#storing-credentials-for-dependabot-to-use | |
env: | |
MT_BOT_USER_NAME: ${{ vars.MT_BOT_USER_NAME }} | |
MT_BOT_USER_EMAIL: ${{ vars.MT_BOT_USER_EMAIL }} | |
jobs: | |
MT-DEPENDENCY-UPDATE-BASELINE-JOB: | |
name: "MT Dependency update baseline" | |
runs-on: ubuntu-latest | |
steps: | |
- name: MT select main repo checkout branch | |
id: mt-pick-main-repo-checkout-branch | |
env: | |
GH_TOKEN: ${{ github.token }} # GitHub CLI in a GitHub Actions workflow | |
run: | | |
MAIN_REPO_URL="https://github.com/mtransitapps/mtransit-for-android.git" | |
MT_BRANCH_NAME=${{ github.head_ref || github.ref_name }} | |
MT_TARGET_BRANCH_NAME=${{ github.base_ref || github.ref_name }} | |
BRANCH_EXISTS=$(git ls-remote --heads $MAIN_REPO_URL $MT_BRANCH_NAME | wc -l); | |
if [ $BRANCH_EXISTS -eq 1 ]; then | |
CHECKOUT_BRANCH=$MT_BRANCH_NAME | |
else | |
# Pull request target branch with same name? | |
BRANCH_EXISTS=$(git ls-remote --heads $MAIN_REPO_URL $MT_TARGET_BRANCH_NAME | wc -l); | |
if [ $BRANCH_EXISTS -eq 1 ]; then | |
CHECKOUT_BRANCH=$MT_TARGET_BRANCH_NAME | |
else | |
echo "WARNING: no match for current or target branch!!!" | |
DEFAULT_REPO_BRANCH=$(gh api repos/mtransitapps/mtransit-for-android --jq '.default_branch'); | |
CHECKOUT_BRANCH=$DEFAULT_REPO_BRANCH | |
fi | |
fi | |
echo "Checkout branch: '$CHECKOUT_BRANCH'." | |
echo "mt_checkout_branch=$CHECKOUT_BRANCH" >> "$GITHUB_OUTPUT" | |
- name: MT check out main repo | |
uses: actions/checkout@v4 | |
with: | |
repository: mtransitapps/mtransit-for-android | |
ref: ${{ steps.mt-pick-main-repo-checkout-branch.outputs.mt_checkout_branch }} | |
submodules: true # required to set right token | |
token: ${{ secrets.MT_PAT || secrets.MT_DEPENDABOT_PAT }} # use our token to trigger workflow events, if available | |
fetch-depth: 0 # fetch all (not required util release build) | |
- name: MT check out submodules | |
run: ./checkout_submodules.sh | |
- name: MT check out this module repo build branch | |
run: | | |
REPOSITORY_OWNER_AND_NAME=${{ github.repository }}; | |
REPOSITORY_NAME=$(basename $REPOSITORY_OWNER_AND_NAME); | |
echo "Repostory name: '$REPOSITORY_NAME'." | |
MT_BRANCH_NAME=${{ github.head_ref || github.ref_name }} | |
echo "Fetching from repo '$REPOSITORY_NAME':" | |
git -C $REPOSITORY_NAME fetch -v --all; | |
echo "Checking our this repo '$REPOSITORY_NAME' workflow branch '$MT_BRANCH_NAME':" | |
git -C $REPOSITORY_NAME switch $MT_BRANCH_NAME; | |
echo "Pulling from repo '$REPOSITORY_NAME':" | |
git -C $REPOSITORY_NAME pull -v; | |
- name: MT setup MT_GIT_BRANCH env | |
if: github.event_name != 'pull_request' | |
run: | | |
echo "MT_GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: MT code setup | |
run: ./commons/code_setup.sh | |
- name: MT set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: MT dependency update baseline | |
run: ./dependency_update_baseline.sh | |
- name: MT commit new baseline | |
run: | | |
cd commons || exit; | |
git config user.name "$MT_BOT_USER_NAME"; | |
git config user.email "$MT_BOT_USER_EMAIL"; | |
git add -v shared-main/app-android/dependencies/*.txt; | |
git add -v shared-opt-dir/parser/dependencies/*.txt; | |
git diff --staged --quiet || git commit -m "Update dependencies baseline"; | |
git push; | |
cd .. || exit; |