From b7ec1a781f34fd0af02d189489b35e5394f0538e Mon Sep 17 00:00:00 2001 From: Jamy Date: Sat, 4 Jan 2025 01:10:46 +0100 Subject: [PATCH] Don't include built theme files in PRs (#99) --- .github/pull_request_template.md | 3 ++- .github/workflows/pr.yml | 22 +++++++++++++--------- .github/workflows/update.yml | 8 ++++++-- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cc42906a..b60a4f3d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,5 +6,6 @@ Fixes #ISSUE_NUMBER ## Checklist -- [ ] I have included the built files `./colors/*.vim` in a separate commit and followed [the build instructions](https://github.com/tinted-theming/tinted-vim/blob/main/CONTRIBUTING.md) +- [ ] I have **NOT** included the built files `./colors/*.vim` in this + PR since the bot will build the files on merge to `main` - [ ] I have confirmed that my changes produce no regressions after building diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 44f2904f..90ba8183 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,15 +1,19 @@ -name: Check that building template does not produce additional changes +name: "Pull Request" + on: pull_request: - branches: - - main + paths: + - "colors/*.vim" + jobs: - check: + check-generated-theme-directories: runs-on: ubuntu-latest steps: - - name: Fetch the repository code + - name: Checkout repository uses: actions/checkout@v4 - - name: Update schemes - uses: tinted-theming/tinted-builder-rust@latest - - name: Check if there are changes - run: git diff --exit-code + + - name: Check for changes in restricted directories + run: | + echo "Error: Changes detected in generated theme directory." + echo "this directory should be generated by tinted-theming-bot after merge." + exit 1 diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 50c8d18f..792d1cf9 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,8 +1,13 @@ name: Update with the latest tinted-theming colorschemes on: + push: + branches: + - main + paths: + - "templates/tinted-vim.mustache" workflow_dispatch: schedule: - - cron: "0 0 * * 0" # https://crontab.guru/every-week + - cron: "0 0 * * *" # https://crontab.guru/every-day jobs: build-and-commit: @@ -11,4 +16,3 @@ jobs: token: ${{ secrets.BOT_ACCESS_TOKEN }} with: ref: ${{ github.head_ref }} -