PHAR prefix diff workflow #11
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
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | |
name: "PHAR Prefix Diff" | |
on: | |
pull_request: | |
paths: | |
- 'compiler/**' | |
- '.github/workflows/phar-prefix-diff.yml' | |
- '.github/scripts/**' | |
concurrency: | |
group: phar-prefix-diff-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches | |
cancel-in-progress: true | |
jobs: | |
phar-prefix-diff: | |
name: "PHAR Prefix Diff" | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get base commit SHA | |
id: base | |
run: echo "base_sha=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT" | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
working-directory: .github/scripts | |
run: npm ci | |
- name: "Compile TS scripts" | |
working-directory: .github/scripts | |
run: npx tsc | |
- name: Find phar-file-checksum from base commit | |
id: find-artifact | |
uses: actions/github-script@v7 | |
env: | |
BASE_SHA: ${{ steps.base.outputs.base_sha }} | |
ARTIFACT_NAME: phar-file-checksum | |
WORKFLOW_NAME: Compile PHAR | |
with: | |
script: | | |
const script = require('./.github/scripts/dist/find-artifact.js'); | |
await script({github, context, core}) | |
- name: Download artifact by ID | |
uses: actions/download-artifact@v4 | |
with: | |
artifact-ids: ${{ steps.find-artifact.outputs.artifact_id }} | |
run-id: ${{ steps.find-artifact.outputs.run_id }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path: ./phar-file-checksum-old.phar |