Skip to content

Commit cbbec0e

Browse files
committed
merge ci jobs
1 parent 0cf3cc3 commit cbbec0e

3 files changed

Lines changed: 63 additions & 25 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: CI
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: read
12+
packages: read
13+
14+
jobs:
15+
lint:
16+
name: Lint
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
statuses: write # To report GitHub Actions status checks
21+
22+
steps:
23+
- name: Checkout Code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Lint Code Base
29+
uses: super-linter/super-linter/slim@v7.1.0
30+
env:
31+
DEFAULT_BRANCH: main
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
VALIDATE_JSCPD: false
34+
VALIDATE_JAVASCRIPT_PRETTIER: false
35+
VALIDATE_MARKDOWN_PRETTIER: false
36+
VALIDATE_CHECKOV: false
37+
38+
dependabot:
39+
name: Dependabot auto-merge
40+
runs-on: ubuntu-latest
41+
needs: lint
42+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'HTTPArchive/dataform'
43+
44+
permissions:
45+
contents: write
46+
pull-requests: write
47+
48+
steps:
49+
- name: Dependabot metadata
50+
id: metadata
51+
uses: dependabot/fetch-metadata@v2
52+
with:
53+
github-token: "${{ secrets.GITHUB_TOKEN }}"
54+
55+
- name: Enable auto-merge for Dependabot PRs
56+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
57+
run: gh pr merge --auto --squash "$PR_URL"
58+
env:
59+
PR_URL: ${{github.event.pull_request.html_url}}
60+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/dependabot.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/linter.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Linter
33

44
on:
55
workflow_dispatch:
6-
pull_request: null
6+
pull_request:
7+
branches:
8+
- main
79
push:
810
branches:
911
- main

0 commit comments

Comments
 (0)