Skip to content

Commit 5346bee

Browse files
Update Actions
Updated the below actions: actions/setup-node actions/upload-pages-artifact Additionally: Format Document
1 parent c7a6f6f commit 5346bee

File tree

3 files changed

+66
-66
lines changed

3 files changed

+66
-66
lines changed

.github/workflows/Publish-NPM.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
# Display name of the job
2727
name: Generate TypeScript SDK
28-
28+
2929
# Operating system filter for the runners
3030
runs-on: ubuntu-latest
3131

@@ -49,7 +49,7 @@ jobs:
4949

5050
# Set up NodeJS on the build host
5151
- name: Setup Node.JS Runtime
52-
uses: actions/setup-node@v4
52+
uses: actions/setup-node@v5
5353
with:
5454
node-version: 22
5555
cache: 'npm'
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install Build Dependencies
7070
run: npm install
7171
working-directory: ${{matrix.specifications.sdkPath}}
72-
72+
7373
# Cryptographically attest that packages haven't been tampered where supported
7474
- name: Attest Provenance
7575
run: npm audit signatures

.github/workflows/Publish-Specs.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,47 @@ jobs:
1919

2020
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2121
permissions:
22-
pages: write
23-
id-token: write
22+
pages: write
23+
id-token: write
2424

2525
# Allow one concurrent deployment
2626
concurrency:
27-
group: "pages"
28-
cancel-in-progress: true
27+
group: 'pages'
28+
cancel-in-progress: true
2929

3030
# List of steps to execute in this job
3131
steps:
32-
# Configure the GH pages environment
33-
- name: Setup Pages
34-
uses: actions/configure-pages@v5
32+
# Configure the GH pages environment
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
3535

36-
# Grab a copy of the latest binaries
37-
- name: Download Latest Swagger UI Release
38-
run: |
39-
LATEST_URL=$(curl -sL https://api.github.com/repos/swagger-api/swagger-ui/releases/latest | grep "tarball_url" | cut -d '"' -f 4)
40-
curl -L "$LATEST_URL" -o swagger-ui.tar.gz
36+
# Grab a copy of the latest binaries
37+
- name: Download Latest Swagger UI Release
38+
run: |
39+
LATEST_URL=$(curl -sL https://api.github.com/repos/swagger-api/swagger-ui/releases/latest | grep "tarball_url" | cut -d '"' -f 4)
40+
curl -L "$LATEST_URL" -o swagger-ui.tar.gz
4141
42-
# Extract the downloaded archive
43-
- name: Extract Swagger UI dist folder
44-
run: |
45-
mkdir swagger-ui
46-
tar -xzf swagger-ui.tar.gz --strip-components=1 -C swagger-ui
42+
# Extract the downloaded archive
43+
- name: Extract Swagger UI dist folder
44+
run: |
45+
mkdir swagger-ui
46+
tar -xzf swagger-ui.tar.gz --strip-components=1 -C swagger-ui
4747
48-
# Update the config to have the SHI Lab Specs
49-
- name: Replace SwaggerUIBundle url with urls array in swagger-initializer.js
50-
run: |
51-
DIST_FILE="swagger-ui/dist/swagger-initializer.js"
52-
# Remove the 'url:' property and insert the 'urls:' array
53-
sed -i '/url: /c\ urls: [\n{\n"url": "https://raw.githubusercontent.com/Software-Hardware-Integration-Lab/OpenAPI/refs/heads/main/specs/Data-Gateway.json",\n"name": "Data Gateway"\n},\n{\n"url": "https://raw.githubusercontent.com/Software-Hardware-Integration-Lab/OpenAPI/refs/heads/main/specs/SHIELD.json",\n"name": "SHIELD"\n},\n{\n"url": "https://raw.githubusercontent.com/Software-Hardware-Integration-Lab/OpenAPI/refs/heads/main/specs/Url-Shortener.json",\n"name": "SHI - URL Shortener"\n}\n],' "$DIST_FILE"
48+
# Update the config to have the SHI Lab Specs
49+
- name: Replace SwaggerUIBundle url with urls array in swagger-initializer.js
50+
run: |
51+
DIST_FILE="swagger-ui/dist/swagger-initializer.js"
52+
# Remove the 'url:' property and insert the 'urls:' array
53+
sed -i '/url: /c\ urls: [\n{\n"url": "https://raw.githubusercontent.com/Software-Hardware-Integration-Lab/OpenAPI/refs/heads/main/specs/Data-Gateway.json",\n"name": "Data Gateway"\n},\n{\n"url": "https://raw.githubusercontent.com/Software-Hardware-Integration-Lab/OpenAPI/refs/heads/main/specs/SHIELD.json",\n"name": "SHIELD"\n},\n{\n"url": "https://raw.githubusercontent.com/Software-Hardware-Integration-Lab/OpenAPI/refs/heads/main/specs/Url-Shortener.json",\n"name": "SHI - URL Shortener"\n}\n],' "$DIST_FILE"
5454
55-
# Uploads the built artifact to github pages
56-
- name: Upload Artifact
57-
uses: actions/upload-pages-artifact@v3
58-
with:
59-
# Upload static files
60-
path: "swagger-ui/dist/"
55+
# Uploads the built artifact to github pages
56+
- name: Upload Artifact
57+
uses: actions/upload-pages-artifact@v4
58+
with:
59+
# Upload static files
60+
path: 'swagger-ui/dist/'
6161

62-
# Deploy the compiled pages
63-
- name: Deploy to GitHub Pages
64-
id: deployment
65-
uses: actions/deploy-pages@v4
62+
# Deploy the compiled pages
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

.github/workflows/Test-Oas.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ on:
77

88
# Run the unit tests on every change
99
push:
10-
branches: [ "main" ]
10+
branches: ['main']
1111
pull_request:
12-
branches: [ "main" ]
12+
branches: ['main']
1313

1414
jobs:
1515
Validate:
1616
# Display name of the job
1717
name: Validate OpenAPI Specs
18-
18+
1919
# Operating system filter for the runners
2020
runs-on: ubuntu-latest
2121

@@ -25,30 +25,30 @@ jobs:
2525

2626
# Run the set of steps needed to validate the OpenAPI Spec files
2727
steps:
28-
# Checks-out your repository under $GITHUB_WORKSPACE
29-
- name: Download Source Files
30-
uses: actions/checkout@v5
31-
32-
# Set up NodeJS on the build host
33-
- name: Setup Node.JS Environment
34-
uses: actions/setup-node@v4
35-
with:
36-
node-version: 22
37-
38-
# Sets up OpenJDK on the build host
39-
- name: Set up Microsoft OpenJDK
40-
uses: actions/setup-java@v5
41-
with:
42-
java-version: '21'
43-
distribution: 'microsoft'
44-
45-
# Install all of the dependencies
46-
- name: Install All of the Project Dependencies
47-
run: npm install @openapitools/openapi-generator-cli -g
48-
49-
# Run the validation of all Specification Files
50-
- name: Validate OpenAPI Specs
51-
run: |
52-
for file in $(find ./specs -name "*.json"); do
53-
openapi-generator-cli validate -i "$file"
54-
done
28+
# Checks-out your repository under $GITHUB_WORKSPACE
29+
- name: Download Source Files
30+
uses: actions/checkout@v5
31+
32+
# Set up NodeJS on the build host
33+
- name: Setup Node.JS Environment
34+
uses: actions/setup-node@v5
35+
with:
36+
node-version: 22
37+
38+
# Sets up OpenJDK on the build host
39+
- name: Set up Microsoft OpenJDK
40+
uses: actions/setup-java@v5
41+
with:
42+
java-version: '21'
43+
distribution: 'microsoft'
44+
45+
# Install all of the dependencies
46+
- name: Install All of the Project Dependencies
47+
run: npm install @openapitools/openapi-generator-cli -g
48+
49+
# Run the validation of all Specification Files
50+
- name: Validate OpenAPI Specs
51+
run: |
52+
for file in $(find ./specs -name "*.json"); do
53+
openapi-generator-cli validate -i "$file"
54+
done

0 commit comments

Comments
 (0)