Skip to content

Commit 32f5753

Browse files
committed
chore: update cicd
1 parent d857e37 commit 32f5753

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

.github/workflows/99-auto-merge.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Dependabot auto-merge
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
dependabot:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.actor == 'dependabot[bot]' }}
10+
steps:
11+
- name: ⏬ Dependabot metadata
12+
id: metadata
13+
uses: dependabot/fetch-metadata@v2
14+
with:
15+
github-token: "${{ secrets.GITHUB_TOKEN }}"
16+
17+
- name: ✔ Approve a PR
18+
run: gh pr review --approve "$PR_URL"
19+
env:
20+
PR_URL: ${{github.event.pull_request.html_url}}
21+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22+
23+
- name: 🤖 Enable auto-merge for Dependabot PRs
24+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
25+
run: gh pr merge --auto --squash "$PR_URL"
26+
env:
27+
PR_URL: ${{github.event.pull_request.html_url}}
28+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/default.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Default Pipeline
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- "main"
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
13+
14+
jobs:
15+
init:
16+
uses: ./.github/workflows/00-init.yml
17+
18+
build:
19+
name: Build
20+
runs-on: ubuntu-latest
21+
needs: [init]
22+
steps:
23+
- name: ⏬ Checkout repo
24+
uses: actions/checkout@v4
25+
26+
- name: 🔄 Init Cache
27+
uses: ./.github/actions/npm-cache
28+
29+
- name: 🔨 Build Packages
30+
run: npm run build

.github/workflows/pull-request.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: On-PR to main
3+
4+
on:
5+
pull_request:
6+
branches: ["main"]
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
actions: read
12+
security-events: write
13+
14+
jobs:
15+
dependabot:
16+
uses: ./.github/workflows/99-auto-merge.yml

0 commit comments

Comments
 (0)