Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #17 from postfinance/dependabot/docker/swaggerapi/…
Browse files Browse the repository at this point in the history
…swagger-ui-v4.14.0

chore(deps): bump swaggerapi/swagger-ui from v4.12.0 to v4.14.0
  • Loading branch information
bbortt authored Sep 22, 2022
2 parents aa103ec + 88cf09a commit ef59a5d
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
assignees:
- 'bbortt'
- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'weekly'
assignees:
- 'bbortt'
35 changes: 25 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: build
on: [push, pull_request]

on:
push:
branches:
- '**/*'
jobs:
release:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -17,14 +19,27 @@ jobs:
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
- name: Build
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
context: .
load: true
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Test
run: |
docker run \
--rm \
--name swagger-ui-test \
-p 8080:8080 \
-e POLL_INTERVAL_SECONDS=60 \
-e POLL_URL=https://raw.githubusercontent.com/bbortt/swagger-ui-demo/master/swagger-config.json \
${{ steps.meta.outputs.tags }} & \
(
sleep 10 && \
if [[ $(curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8080) -ne 200 ]]; then
exit 1;
fi && \
docker container stop swagger-ui-test
)
32 changes: 32 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build
on:
push:
branches:
- release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: postfinance/polling-swagger-ui
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swaggerapi/swagger-ui:v4.12.0
FROM swaggerapi/swagger-ui:v4.14.0
MAINTAINER OpenSource PF <[email protected]>

ENV CONFIG_URL /apis/swagger-config.json
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The following command demonstrates a sample container start:
docker run \
--rm \
-p 80:8080 \
-e POLL_INTERVAL_SECONDS=60
-e POLL_INTERVAL_SECONDS=60 \
-e POLL_URL=https://raw.githubusercontent.com/bbortt/swagger-ui-demo/master/swagger-config.json \
postfinance/polling-swagger-ui:1.0.0
```
Expand Down
2 changes: 1 addition & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Docker entrypoint starting nginx as well as the polling process.
# Original CMD ["sh", "/usr/share/nginx/run.sh"]: https://github.com/swagger-api/swagger-ui/blob/master/Dockerfile.

/appl/polling-swagger-ui/poll-monitor.sh & /docker-entrypoint.sh sh /usr/share/nginx/run.sh
/appl/polling-swagger-ui/poll-monitor.sh & /docker-entrypoint.sh sh -c "nginx -g \"daemon off;\""

0 comments on commit ef59a5d

Please sign in to comment.