This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
chore(deps): pin dependencies #71290
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
name: Check that there are no large binary files | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
large-files: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
with: | |
fetch-depth: 0 # We analyze Git history | |
- name: Check for large files | |
uses: Amadevus/pwsh-script@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
script: | | |
$global:ProgressPreference = 'SilentlyContinue' | |
$global:InformationPreference = 'Continue' | |
Set-StrictMode -Version 3.0 | |
Install-Module PowerGit -Force -ErrorAction Stop | |
Install-Module PSGitHub -Force -ErrorAction Stop | |
if (-not $env:GITHUB_TOKEN) { | |
throw "No GITHUB_TOKEN env var provided" | |
} | |
$githubToken = ConvertTo-SecureString -String $env:GITHUB_TOKEN -AsPlainText -Force | |
$baseRef = $github.base_ref | |
git branch $BaseRef "origin/$BaseRef" | |
./src/scripts/check-large-files.ps1 -BaseRef $baseRef -PullRequestNumber $github.event.pull_request.number -GitHubToken $githubToken |