Merge pull request #1 from InvoiceShelf/readme-install-refresh #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |