Skip to content

Commit

Permalink
Merge pull request #191 from ethereum/mpetrunic/ci-upgrade
Browse files Browse the repository at this point in the history
Replace deprecated docker actions and use npm packages directly
  • Loading branch information
djrtwo authored Feb 21, 2022
2 parents 1cb3cec + bb0926f commit 4a88ce7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm i -g @apidevtools/swagger-cli@4
- name: Prepare deploy directory
run: |
mkdir ./deploy
cp -r dist ./deploy
cp -r assets ./deploy
cp -r index.html ./deploy
- name: Bundle spec
uses: mpetrunic/swagger-cli-action@v1.0.0
with:
command: "bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml"
run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml"
- name: Publish to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm i -g @apidevtools/swagger-cli@4 @stoplight/spectral-cli@6.2.0
- run: spectral --version

- name: Lint spec
uses: vaibhav-jain/spectral-action/@v2.6.1
with:
file_path: beacon-node-oapi.yaml
run: spectral lint ./beacon-node-oapi.yaml

- name: Bundle spec
uses: mpetrunic/swagger-cli-action@v1.0.0
with:
command: "bundle ./beacon-node-oapi.yaml -r -t yaml -o ./bundle.yaml"
run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml"
10 changes: 4 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm i -g @apidevtools/swagger-cli@4
- name: Bundle yaml spec
uses: mpetrunic/swagger-cli-action@v1.0.0
with:
command: "bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml"
run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml"
- name: Bundle json spec
uses: mpetrunic/swagger-cli-action@v1.0.0
with:
command: "bundle ./beacon-node-oapi.yaml -r -t json -o ./deploy/beacon-node-oapi.json"
run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t json -o ./deploy/beacon-node-oapi.json"
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ Api spec is checked for lint errors before merge.

To run lint locally, install linter with
```
npm install -g @stoplight/spectral
npm install -g @stoplight/spectral-cli@6.2.1
# OR
yarn global add @stoplight/spectral
yarn global add @stoplight/spectral-cli@6.2.1
```
and run lint with
```
Expand Down
4 changes: 2 additions & 2 deletions params/index.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
StateId:
required: true
name: state_id
in: path
required: true
example: "head"
schema:
type: string
description: |
State identifier.
Can be one of: "head" (canonical head in node's view), "genesis", "finalized", "justified", \<slot\>, \<hex encoded stateRoot with 0x prefix\>.
BlockId:
required: true
name: block_id
in: path
required: true
example: "head"
schema:
type: string
Expand Down

0 comments on commit 4a88ce7

Please sign in to comment.