Skip to content

Commit f347dad

Browse files
committed
ci: reflect changes to GitHub workflows from master
Refs #3656
1 parent 10e95b5 commit f347dad

File tree

3 files changed

+25
-29
lines changed

3 files changed

+25
-29
lines changed

.github/workflows/deploy-rancher.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy SwaggerEditor@next to Rancher🚢
33

44
on:
55
workflow_run:
6-
workflows: ["Release SwaggerEditor@next"]
6+
workflows: ["Build & Push SwaggerEditor@next Docker image"]
77
types:
88
- completed
99

.github/workflows/docker-build-push.yml

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,42 @@ name: Build & Push SwaggerEditor@next Docker image
33

44
on:
55
workflow_run:
6-
workflows: ["SwaggerEditor@next build", "SwaggerEditor@next nightly build"]
6+
workflows: ["Release SwaggerEditor@next"]
77
types:
88
- completed
99
branches: [next]
1010

1111
jobs:
1212

1313
build-push:
14-
if: >
15-
github.event.workflow_run.event == 'push' &&
16-
github.event.workflow_run.conclusion == 'success'
14+
if: github.event.workflow_run.conclusion == 'success'
1715
name: Build & Push SwaggerEditor@next Docker image
1816
runs-on: ubuntu-latest
1917

2018
steps:
21-
- uses: actions/checkout@v3
19+
- name: Checkout
20+
uses: actions/checkout@v3
2221
with:
22+
fetch-depth: 0
23+
persist-credentials: false
24+
submodules: true
2325
ref: next
24-
- name: 'Download build artifact'
25-
uses: actions/github-script@v6
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
2629
with:
27-
script: |
28-
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
29-
owner: context.repo.owner,
30-
repo: context.repo.repo,
31-
run_id: context.payload.workflow_run.id,
32-
});
33-
const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
34-
return artifact.name == "build"
35-
})[0];
36-
const download = await github.rest.actions.downloadArtifact({
37-
owner: context.repo.owner,
38-
repo: context.repo.repo,
39-
artifact_id: matchArtifact.id,
40-
archive_format: 'zip',
41-
});
42-
const fs = require('fs');
43-
fs.writeFileSync('${{github.workspace}}/build.zip', Buffer.from(download.data));
44-
- run: |
45-
mkdir build
46-
unzip build.zip -d build
30+
node-version: 16.16
31+
registry-url: https://npm.pkg.github.com/
32+
scope: "@swagger-api"
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
38+
39+
- name: Build App artifacts
40+
run: npm run build:app
41+
4742
- name: Set up QEMU
4843
uses: docker/setup-qemu-action@v2
4944

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020
- name: Setup Node.js
2121
uses: actions/setup-node@v3
2222
with:
23-
node-version: 16.16
23+
node-version: 16
2424
registry-url: https://npm.pkg.github.com/
2525
scope: "@swagger-api"
2626

2727
- name: Install dependencies
2828
run: npm ci
2929
env:
3030
NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
31+
3132
- name: Prepare for the Release
3233
run: |
3334
npm run lint

0 commit comments

Comments
 (0)