feat: Implement New Attributions Update Workflow via GitHub Actions #3
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
name: Check attribution | |
on: | |
pull_request: | |
branches: | |
- develop | |
types: | |
- opened | |
- synchronize | |
jobs: | |
prepare: | |
name: Prepare dependencies | |
runs-on: ubuntu-latest | |
outputs: | |
COMMIT_SHA: ${{ steps.commit-sha.outputs.COMMIT_SHA }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Install Yarn dependencies | |
run: yarn --immutable | |
- name: Get commit SHA | |
id: commit-sha | |
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
generate-and-validate-attribution: | |
name: Generate and Validate Attribution | |
runs-on: ubuntu-latest | |
needs: prepare | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
COMMIT_SHA: ${{ needs.prepare.outputs.COMMIT_SHA }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Install dependencies from cache | |
run: yarn --immutable --immutable-cache | |
- name: Generate Attribution | |
run: yarn generate:attribution | |
- name: Check attribution changes | |
run: yarn test:attribution-check |