electron/.github/workflows/archaeologist-dig.yml
dependabot[bot] 6c6e5c002a
build(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 (#44173)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](50769540e7...b4b15b8c7c)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-18 15:39:55 +02:00

65 lines
2.6 KiB
YAML

name: Archaeologist
on:
pull_request:
jobs:
archaeologist-dig:
name: Archaeologist Dig
runs-on: ubuntu-latest
steps:
- name: Checkout Electron
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.0.2
with:
fetch-depth: 0
- name: Setup Node.js/npm
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: 20.11.x
- name: Setting Up Dig Site
run: |
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
echo "sha ${{ github.event.pull_request.head.sha }}"
echo "base ref ${{ github.event.pull_request.base.ref }}"
git clone https://github.com/electron/electron.git electron
cd electron
mkdir -p artifacts
git remote add fork ${{ github.event.pull_request.head.repo.clone_url }} && git fetch fork
git checkout ${{ github.event.pull_request.head.sha }}
git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD > .dig-old
echo ${{ github.event.pull_request.head.sha }} > .dig-new
cp .dig-old artifacts
- name: Generating Types for SHA in .dig-new
uses: ./.github/actions/generate-types
with:
sha-file: .dig-new
filename: electron.new.d.ts
- name: Generating Types for SHA in .dig-old
uses: ./.github/actions/generate-types
with:
sha-file: .dig-old
filename: electron.old.d.ts
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
with:
name: artifacts
path: electron/artifacts
include-hidden-files: true
- name: Set job output
run: |
git diff --no-index electron.old.d.ts electron.new.d.ts > patchfile || true
if [ -s patchfile ]; then
echo "Changes Detected"
echo "## Changes Detected" > $GITHUB_STEP_SUMMARY
echo "Looks like the \`electron.d.ts\` file changed." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`\`\`\`diff" >> $GITHUB_STEP_SUMMARY
cat patchfile >> $GITHUB_STEP_SUMMARY
echo "\`\`\`\`\`\`" >> $GITHUB_STEP_SUMMARY
else
echo "No Changes Detected"
echo "## No Changes" > $GITHUB_STEP_SUMMARY
echo "We couldn't see any changes in the \`electron.d.ts\` artifact" >> $GITHUB_STEP_SUMMARY
fi
working-directory: ./electron/artifacts