Skip to content

Commit 57a6ec5

Browse files
Merge branch 'main' into development
2 parents 8cab936 + 1e10374 commit 57a6ec5

File tree

5 files changed

+296
-252
lines changed

5 files changed

+296
-252
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "github-actions" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
1010
schedule:
1111
interval: "weekly"
1212

.github/workflows/dependabot.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Dependabot Auto-Merge
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
test:
11+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'HTTPArchive/tech-report-apis'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: |
16+
cd src
17+
npm ci
18+
npm run test
19+
20+
dependabot:
21+
name: Dependabot auto-merge
22+
runs-on: ubuntu-latest
23+
needs: test
24+
25+
permissions:
26+
contents: write
27+
pull-requests: write
28+
29+
steps:
30+
- name: Dependabot metadata
31+
id: metadata
32+
uses: dependabot/fetch-metadata@v2
33+
with:
34+
github-token: '${{ secrets.GITHUB_TOKEN }}'
35+
36+
- name: Enable auto-merge for Dependabot PRs
37+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
38+
run: gh pr merge --auto --squash "$PR_URL"
39+
env:
40+
PR_URL: ${{github.event.pull_request.html_url}}
41+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/pipeline.yaml renamed to .github/workflows/deployment.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
name: Tech Report API Pipeline
1+
name: Deployment
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- development
7+
- main
48

59
env:
610
PIPELINE_SA_KEY: ${{ secrets.GCP_SA_KEY }}
@@ -112,4 +116,3 @@ jobs:
112116
terraform apply -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
113117
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
114118
-auto-approve
115-

0 commit comments

Comments
 (0)