-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.09 KB
/
Copy pathbuild.yml
File metadata and controls
43 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build & Publish API Docs
# Fetches the latest OpenAPI spec, bakes it into a static Swagger UI image, and
# pushes it to GHCR. The cluster (ideologix/k8s-production-cluster) bumps the
# deployed digest via its own update-images workflow on the image-pushed event.
on:
push:
branches: [main]
workflow_dispatch:
# Fired by the InvoiceShelf app repo after it publishes a fresh spec.
repository_dispatch:
types: [spec-updated]
concurrency:
group: api-docs-build
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch latest OpenAPI spec
run: bash scripts/fetch-specs.sh
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/invoiceshelf/api-docs:latest