From 134a0209ce0ae8fb734a235e7612f7b3389b295c Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Mon, 7 Aug 2023 21:28:00 -0400 Subject: [PATCH] ci: move PR validation to organization level (#509) --- .github/workflows/ci.yml | 19 ++++++++++++++++- .github/workflows/semantic_pr.yml | 35 ------------------------------- 2 files changed, 18 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/semantic_pr.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3fdfc552..bc98f7fb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,31 @@ -name: CI/CD +name: AstroNvim on: push: branches: ["main"] pull_request: jobs: + scopes: + name: Calculate scopes + runs-on: ubuntu-latest + outputs: + scopes: ${{ steps.get-scopes.outputs.scopes }} + steps: + - uses: actions/checkout@v3 + - id: get-scopes + run: | + echo "scopes<> $GITHUB_OUTPUT + find lua/astrocommunity -mindepth 1 -maxdepth 2 -type d -exec basename {} \; >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT CI: uses: AstroNvim/.github/.github/workflows/plugin_ci.yml@main secrets: inherit + needs: scopes with: plugin_name: ${{ github.event.repository.name }} is_production: ${{ github.event_name == 'push' }} docs: false + spellcheck: false + commit_msg: false + pr_title: true + scopes: ${{ needs.scopes.outputs.scopes }} diff --git a/.github/workflows/semantic_pr.yml b/.github/workflows/semantic_pr.yml deleted file mode 100644 index 47c20cbb1..000000000 --- a/.github/workflows/semantic_pr.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Semantic PR -on: - pull_request: - types: - - opened - - edited - - synchronize - -jobs: - semantic-pr: - name: Validate PR title - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - id: get-scopes - run: | - echo "scopes<> $GITHUB_OUTPUT - find lua/astrocommunity -mindepth 1 -maxdepth 2 -type d -exec basename {} \; >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - scopes: ${{ steps.get-scopes.outputs.scopes }} - requireScope: true - types: | - chore - ci - docs - feat - fix - perf - refactor - ignoreLabels: | - autorelease: pending