diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml index b4154d6e2..fa0d27296 100644 --- a/.github/workflows/lint-pr.yaml +++ b/.github/workflows/lint-pr.yaml @@ -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/action-install-gh-release@v1.12.0 + with: + repo: terraform-docs/terraform-docs + - name: Yarn install + run: | + yarn install + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/oss.yml b/.github/workflows/oss.yml index 177ae8e3d..bd57d0604 100644 --- a/.github/workflows/oss.yml +++ b/.github/workflows/oss.yml @@ -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: | @@ -29,18 +32,20 @@ jobs: echo "/tmp/ort/cli/build/install/ort/bin" >> $GITHUB_PATH go install github.com/google/go-licenses@v1.5.0 - + (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