From 10a8f7f86603e19cb4adaf1f64b46381eccc42a8 Mon Sep 17 00:00:00 2001 From: Yusuf Ali Date: Sat, 8 Mar 2025 14:36:29 -0500 Subject: [PATCH] ci: pushing new workflows --- .github/dependabot.yml | 27 +++++----------- .github/workflows/commit.yml | 32 +++++++++++++++++++ .github/workflows/dependabot-auto-merge.yml | 35 +++++++++++++++++++++ renovate.json | 3 ++ 4 files changed, 78 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/commit.yml create mode 100644 .github/workflows/dependabot-auto-merge.yml create mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a38f285..2c03fd8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,20 +1,9 @@ -version: 2 updates: - - package-ecosystem: docker - commit-message: - prefix: fix - directory: / - schedule: - interval: weekly - - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: "daily" - - - package-ecosystem: "pip" - commit-message: - prefix: fix - directory: "/" - schedule: - interval: "daily" \ No newline at end of file +- commit-message: + prefix: fix + directory: / + package-ecosystem: github-actions + reviewers: [] + schedule: + interval: daily +version: 2 diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml new file mode 100644 index 0000000..b70fea1 --- /dev/null +++ b/.github/workflows/commit.yml @@ -0,0 +1,32 @@ +jobs: + commitlint: + name: commitlint + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 100 + fetch-tags: true + submodules: true + - uses: actions/setup-node@v4 + with: + node-version: '18' + - name: Install commitlint + run: | + if [ -f package.json ]; then + rm package*.json + fi + npm install -g @commitlint/cli @commitlint/config-conventional + if [ ! -f "commitlint.config.js" ]; then + echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js + fi + - if: github.event_name == 'push' + name: Lint Commit Message + run: commitlint --from=HEAD~1 --verbose + - if: github.event_name == 'pull_request' + name: Lint Pull Request + run: commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose +name: COMMIT LINT +'on': + pull_request: {} + push: {} +run-name: COMMIT LINT diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..58ba543 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,35 @@ +jobs: + dependabot: + if: github.event.pull_request.user.login == 'dependabot[bot]' + name: dependabot + steps: + - env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{github.event.pull_request.html_url}} + name: Enable auto-merge for Dependabot + run: gh pr merge --auto --merge "$PR_URL" + devopsbot: + if: github.event.pull_request.title == 'devopsbot update' + name: devopsbot + steps: + - env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{github.event.pull_request.html_url}} + name: Enable auto-merge for Dependabot + run: gh pr merge --auto --merge "$PR_URL" + rennovatebot: + if: github.event.pull_request.user.login == 'renovate_bot' + name: rennovatebot + steps: + - env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{github.event.pull_request.html_url}} + name: Enable auto-merge for Dependabot + run: gh pr merge --auto --merge "$PR_URL" +name: Dependabot Auto-Merge +'on': + pull_request: {} +permissions: + contents: write + pull-requests: write +run-name: Dependabot Auto-Merge diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..46ecf84 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json" +} \ No newline at end of file