Skip to content

Commit

Permalink
Parallelize OSS workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson committed Dec 13, 2024
1 parent 8bda346 commit 96a84d9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,30 @@ permissions:

jobs:
semanticpr:
name: Semantic Pull Request
name: "Semantic Pull Request"
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pre-commit:
name: "Pre-commit hooks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
- name: Setup terraform-docs
uses: jaxxstorm/[email protected]
with:
repo: terraform-docs/terraform-docs
- name: Yarn install
run: |
yarn install
- uses: pre-commit/[email protected]
23 changes: 14 additions & 9 deletions .github/workflows/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ on:

jobs:
attribution:
strategy:
matrix:
component: [cart, catalog, checkout, orders, ui]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
distribution: "corretto"
java-version: "17"

- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"

- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: "1.18"

- name: Install
run: |
Expand All @@ -29,18 +32,20 @@ jobs:
echo "/tmp/ort/cli/build/install/ort/bin" >> $GITHUB_PATH
go install github.com/google/[email protected]
(cd oss/attribution && pip3 install -r requirements.txt)
- name: Run
env:
COMPONENT_NAME: ${{ matrix.component }}
run: |
bash oss/run.sh
bash oss/run.sh -s $COMPONENT_NAME
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
add-path: src/**/ATTRIBUTION.md
branch: attribution-updates
title: "chore(deps): Update OSS attribution"
branch: attribution-updates-${{ matrix.component }}
title: "chore(deps): Update OSS attribution for ${{ matrix.component }}"
commit-message: "[Automated] Updating OSS attribution documents"
delete-branch: true

0 comments on commit 96a84d9

Please sign in to comment.