Support for Elasticsearch DSL in SimpleEngine #109
Workflow file for this run
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: Docker Builds | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+*' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'asap-common/installation/**' | |
| - 'asap-planner-rs/**' | |
| - 'asap-summary-ingest/**' | |
| - 'asap-query-engine/**' | |
| - 'asap-tools/queriers/prometheus-client/**' | |
| - 'asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/**' | |
| - '.github/workflows/docker.yml' | |
| workflow_dispatch: | |
| inputs: | |
| image-tag: | |
| description: 'Tag to use for pushed images (e.g. v0.1.0, dev)' | |
| required: true | |
| default: 'dev' | |
| permissions: | |
| packages: write | |
| contents: read | |
| jobs: | |
| build-images: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Resolve image tag | |
| id: tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "value=${{ inputs.image-tag }}" >> $GITHUB_OUTPUT | |
| elif [ "${{ github.event_name }}" = "push" ]; then | |
| echo "value=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "value=pr-test" >> $GITHUB_OUTPUT | |
| fi | |
| # --- Base image (Python, fast) --- | |
| - name: Build base image | |
| run: | | |
| docker build \ | |
| -t sketchdb-base:latest \ | |
| -f asap-common/installation/Dockerfile \ | |
| asap-common | |
| - name: Push base image | |
| if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
| run: | | |
| docker tag sketchdb-base:latest ghcr.io/projectasap/asap-base:${{ steps.tag.outputs.value }} | |
| docker tag sketchdb-base:latest ghcr.io/projectasap/asap-base:latest | |
| docker push ghcr.io/projectasap/asap-base:${{ steps.tag.outputs.value }} | |
| docker push ghcr.io/projectasap/asap-base:latest | |
| # --- Planner RS (Rust) --- | |
| - name: Build and push planner-rs | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: asap-planner-rs/Dockerfile | |
| push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
| tags: | | |
| ghcr.io/projectasap/asap-planner-rs:${{ steps.tag.outputs.value }} | |
| ghcr.io/projectasap/asap-planner-rs:latest | |
| cache-from: type=registry,ref=ghcr.io/projectasap/asap-planner-rs:buildcache | |
| cache-to: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && 'type=registry,ref=ghcr.io/projectasap/asap-planner-rs:buildcache,mode=max' || '' }} | |
| # --- Summary Ingest (Python, depends on base) --- | |
| - name: Build summary-ingest image | |
| run: | | |
| docker build \ | |
| -t asap-summary-ingest:local \ | |
| -f asap-summary-ingest/Dockerfile \ | |
| asap-summary-ingest | |
| - name: Push summary-ingest image | |
| if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
| run: | | |
| docker tag asap-summary-ingest:local ghcr.io/projectasap/asap-summary-ingest:${{ steps.tag.outputs.value }} | |
| docker tag asap-summary-ingest:local ghcr.io/projectasap/asap-summary-ingest:latest | |
| docker push ghcr.io/projectasap/asap-summary-ingest:${{ steps.tag.outputs.value }} | |
| docker push ghcr.io/projectasap/asap-summary-ingest:latest | |
| # --- Prometheus Client (Python, depends on base) --- | |
| - name: Build prometheus-client image | |
| run: | | |
| docker build \ | |
| -t asap-prometheus-client:local \ | |
| -f asap-tools/queriers/prometheus-client/Dockerfile \ | |
| asap-tools/queriers/prometheus-client | |
| - name: Push prometheus-client image | |
| if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
| run: | | |
| docker tag asap-prometheus-client:local ghcr.io/projectasap/asap-prometheus-client:${{ steps.tag.outputs.value }} | |
| docker tag asap-prometheus-client:local ghcr.io/projectasap/asap-prometheus-client:latest | |
| docker push ghcr.io/projectasap/asap-prometheus-client:${{ steps.tag.outputs.value }} | |
| docker push ghcr.io/projectasap/asap-prometheus-client:latest | |
| # --- Fake Exporter (Rust) --- | |
| - name: Build and push fake-exporter | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/fake_exporter | |
| file: asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/fake_exporter/Dockerfile | |
| push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
| tags: | | |
| ghcr.io/projectasap/asap-fake-exporter:${{ steps.tag.outputs.value }} | |
| ghcr.io/projectasap/asap-fake-exporter:latest | |
| cache-from: type=registry,ref=ghcr.io/projectasap/asap-fake-exporter:buildcache | |
| cache-to: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && 'type=registry,ref=ghcr.io/projectasap/asap-fake-exporter:buildcache,mode=max' || '' }} | |
| # --- Query Engine (Rust, slow — uses GHCR layer cache) --- | |
| - name: Build and push query-engine | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: asap-query-engine/Dockerfile | |
| push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
| tags: | | |
| ghcr.io/projectasap/asap-query-engine:${{ steps.tag.outputs.value }} | |
| ghcr.io/projectasap/asap-query-engine:latest | |
| cache-from: type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache | |
| cache-to: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && 'type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache,mode=max' || '' }} |