diff options
| author | rtkay123 <dev@kanjala.com> | 2025-08-23 15:08:24 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2025-08-23 15:08:24 +0200 |
| commit | 713795796bc6adae99a3ab9d1dc3e7ba428ca08c (patch) | |
| tree | 9fbf511ccc27f4738e89fba2947508fb978545ef /.github/workflows | |
| parent | c67f80db85135da9ee94089c230ef7f25c1f2762 (diff) | |
| download | warden-713795796bc6adae99a3ab9d1dc3e7ba428ca08c.tar.bz2 warden-713795796bc6adae99a3ab9d1dc3e7ba428ca08c.zip | |
ci: publish
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/publish.yaml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a7b5fee --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,72 @@ +permissions: + contents: read + packages: write +on: + push: + branches: [master] + tags: [v*] + workflow_dispatch: + inputs: + processors: + description: "List of processors" + type: string + required: false + default: "['pseudonyms', 'warden', 'configuration', 'router', 'rule-executor', 'aggregator', 'typologies']" + apiDoc: + description: 'API Documentation' + required: false + type: choice + options: + - scalar + - swagger + - redoc + - rapidoc + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +name: publish + +jobs: + docker: + runs-on: ubuntu-latest + strategy: + matrix: + crate: ${{ fromJSON(github.event.inputs.processors || '["pseudonyms", "warden", "configuration", "router", "rule-executor", "aggregator", "typologies"]') }} + steps: + - uses: actions/checkout@v5 + with: + submodules: true + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ github.actor }}/warden-${{ matrix.crate }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + sbom: true + push: true + context: . + file: crates/${{ matrix.crate }}/Dockerfile + provenance: mode=max + tags: ghcr.io/${{ steps.meta.outputs.tags }}${{ matrix.crate == 'warden' || matrix.crate == 'configuration' && format('-{0}', github.event.inputs.apiDoc) || '' }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + FEATURES=${{ github.event.inputs.apiDoc || 'scalar' }} |
