3bda4002fe
Build and Push Docker Container / build-and-push (push) Successful in 4m29s
- Allow vault and vaults commands when a token has path restrictions - Treat vault/vaults as pathless metadata commands in policy checks - Add allowed commands, vaults and paths to 403 permission errors - Surface real JWT failure reason in 401 instead of generic Unauthorized - Report missing, malformed and empty Bearer tokens distinctly - Catch httpRequest failures in the n8n node to avoid circular JSON - Map API errors to clean NodeApiError with status code and detail - Support continueOnFail with per-item error output in the n8n node - Push a versioned image tag from pyproject in the CI workflow - Bump server to 1.0.2 and n8n node package to 0.2.1 - Add tests for vault info access and richer auth error messages
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: Build and Push Docker Container
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IMAGE_NAME: obsidian-api
|
|
OBSIDIAN_VERSION: "1.12.7"
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Rewrite SSH submodule URLs to HTTPS for CI
|
|
run: |
|
|
git config --global url."https://x-token:${{ secrets.ACTION_ACCESS_TOKEN }}@git.yiprawr.dev/".insteadOf "git@git.yiprawr.dev:"
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
token: "${{ secrets.ACTION_ACCESS_TOKEN }}"
|
|
submodules: recursive
|
|
|
|
- name: Read app version
|
|
id: version
|
|
run: |
|
|
VERSION=$(grep -m1 '^version' pyproject.toml | sed -E 's/.*"(.*)".*/\1/')
|
|
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Login to Docker registry
|
|
uses: docker/login-action@v4
|
|
with:
|
|
registry: ${{ vars.DOCKER_REGISTRY_URL }}
|
|
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
|
password: ${{ secrets.ACTION_ACCESS_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
platforms: linux/amd64
|
|
build-args: |
|
|
OBSIDIAN_VERSION=${{ env.OBSIDIAN_VERSION }}
|
|
tags: |
|
|
${{ vars.DOCKER_REGISTRY_URL }}/docker/${{ env.IMAGE_NAME }}:latest
|
|
${{ vars.DOCKER_REGISTRY_URL }}/docker/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}
|