Skip to content

Commit 1b9c971

Browse files
authored
Enable GitHub actions preview workflow (#7)
This PR makes the following changes 1. Allow `build-deploy` workflow to run when commits are pushed (preview is enabled so changes from PR are deployed to a draft) 2. Add linting to ci 3. Make a one character change to oidc.yaml to trigger workflow for testing results
1 parent bfcf90a commit 1b9c971

3 files changed

Lines changed: 34 additions & 4 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
# pull_request:
8-
# paths:
9-
# - "api/**"
7+
pull_request:
8+
paths:
9+
- "api/**"
1010
workflow_dispatch:
1111

1212
permissions:

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- "api/**"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
validate:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "20"
23+
24+
- run: npm ci
25+
26+
- name: Generate OpenAPI spec
27+
run: npm run generate
28+
29+
- name: Validate OpenAPI spec
30+
run: npm run validate

api/registry.npmjs.com/oidc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ paths:
55
- registry.npmjs.org
66
summary: Exchange OIDC id_token for npm registry token
77
description: |
8-
Exchanges a valid OIDC id_token (provided as a Bearer token) for a short-lived npm registry access token for the specified package.
8+
Exchange a valid OIDC id_token (provided as a Bearer token) for a short-lived npm registry access token for the specified package.
99
1010
**OIDC Token Requirements:**
1111
- The Bearer token must be an OIDC id_token from a supported Identity Provider (IdP)

0 commit comments

Comments
 (0)