Skip to content

Commit db81cd0

Browse files
authored
ci(docker): build and publish unstable docker image (#10491)
This change is part of migration from Jenkins to GitHub Actions.
1 parent f2c454a commit db81cd0

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build & Push SwaggerUI unstable Docker image
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Node.js CI"]
6+
types:
7+
- completed
8+
branches: [master]
9+
10+
jobs:
11+
12+
build-push-unstable:
13+
if: github.event.workflow_run.conclusion == 'success'
14+
name: Build & Push SwaggerUI unstable Docker image
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js 22
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
cache: npm
25+
cache-dependency-path: package-lock.json
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build SwaggerUI
31+
run: npm run build
32+
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v3
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Log in to DockerHub
40+
uses: docker/login-action@v3
41+
with:
42+
username: ${{ secrets.DOCKERHUB_SB_USERNAME }}
43+
password: ${{ secrets.DOCKERHUB_SB_PASSWORD }}
44+
45+
- name: Build docker image and push
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: .
49+
push: true
50+
platforms: linux/amd64,linux/arm/v6,linux/arm64,linux/386,linux/ppc64le
51+
provenance: false
52+
tags: swaggerapi/swagger-ui:unstable

0 commit comments

Comments
 (0)