deps(dev): bump @types/node from 22.10.5 to 22.10.10 #1419
Workflow file for this run
This file contains 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
# Contains different utility checks for Pull Requests. | |
name: PR Utils | |
# Only apply to PRs which target 'master' branch. | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
jobs: | |
lint-commits: | |
name: Lint commits | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' | |
steps: | |
- name: Run linter | |
uses: abinnovision/actions@run-commitlint-v1 | |
dependabot: | |
name: "Dependabot automations" | |
# Only run for Dependabot PRs. | |
if: github.event.pull_request.user.login == 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
issues: write | |
repository-projects: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- id: status | |
name: Resolve current status | |
run: | | |
echo "HAS_REVIEWS=$(if [[ $(gh pr status --json reviews | jq '.currentBranch.reviews | length') -eq '0' ]];then echo 'false'; else echo 'true'; fi)" >> $GITHUB_OUTPUT | |
echo "LAST_REVIEW_DISMISSED=$(if [[ $(gh pr status --json reviews | jq '.currentBranch.reviews[-1].state' | sed 's/"//g') -eq 'DISMISSED' ]];then echo 'true'; else echo 'false'; fi)" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Metadata | |
id: metadata | |
uses: dependabot/[email protected] | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Enable auto-rebase | |
id: enable-auto-rebase | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: "Approve (minor & patch)" | |
id: approve | |
if: (steps.status.outputs.HAS_REVIEWS == 'false' || steps.status.outputs.LAST_REVIEW_DISMISSED == 'true') && steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | |
run: gh pr review --approve "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
dependabot-dedupe: | |
name: "Dependabot / Yarn deduplication" | |
runs-on: ubuntu-latest | |
# Only run for Dependabot PRs. | |
if: github.event.pull_request.user.login == 'dependabot[bot]' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dedupe | |
run: | | |
yarn install --immutable | |
yarn dedupe | |
git diff --exit-code --quiet yarn.lock | |
# If there are changes, commit them. | |
if [[ $(git status --porcelain) ]]; then | |
echo "has-changes=true" >> $GITHUB_OUTPUT | |
else | |
echo "has-changes=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Setup GCP Authentication | |
if: steps.dedupe.outputs.has-changes == 'true' | |
uses: abinnovision/actions/actions/setup-gcp@master | |
with: | |
auth: ${{ inputs.gcp-auth }} | |
- id: token | |
if: steps.dedupe.outputs.has-changes == 'true' | |
name: Generate GitHub App token | |
uses: abinnovision/actions/actions/get-github-app-token@master | |
with: | |
identification: ${{ secrets.GH_APP_IDENTIFICATION_RELEASER }} | |
- name: Fetch Bot metadata | |
if: steps.dedupe.outputs.has-changes == 'true' | |
env: | |
GITHUB_TOKEN: ${{ steps.token.outputs.token }} | |
run: | | |
bot_data=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /user) | |
echo "bot-login=$(echo $bot_data | jq -r .login)" >> $GITHUB_OUTPUT | |
echo "bot-email=$(echo $bot_data | jq -r .email)" >> $GITHUB_OUTPUT | |
- name: Commit changes | |
if: steps.dedupe.outputs.has-changes == 'true' | |
run: | | |
git config --global user.name '${{ steps.bot-login.outputs.bot-login }}' | |
git config --global user.email '${{ steps.bot-email.outputs.bot-email }}' | |
git commit -am "build: deduplicate dependencies" | |
- name: Push changes | |
if: steps.dedupe.outputs.has-changes == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ steps.token.outputs.token }} | |
branch: ${{ github.head_ref }} |