ci(deps): update temporalite (#332) #349
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: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/builds.yaml' | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| BASE_NAME: graphops/docker-builds | |
| DOCKER_BUILDKIT: 1 | |
| BUILDX_NO_DEFAULT_LOAD: 1 | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| context: | |
| - init-toolbox | |
| - graph-toolbox | |
| - temporalite | |
| - init-stream-download | |
| - netbox | |
| - altair | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract versions from Dockerfile | |
| id: versions | |
| run: | | |
| set -exo pipefail; | |
| # Extract versions and store as JSON | |
| versions=$(./scripts/extract-versions.sh "./dockerfiles/${{ matrix.context }}/Dockerfile") | |
| # Validate JSON and store | |
| echo "$versions" | jq '.' > /dev/null # Validate JSON | |
| echo "versions=$versions" >> $GITHUB_OUTPUT | |
| # Create hyphen-separated version string | |
| version_string=$(echo "$versions" | jq -r 'map(.value) | join("-")') | |
| echo "version_string=$version_string" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.BASE_NAME }}/${{ matrix.context }} | |
| tags: | | |
| # Version-based tag from concatenated versions | |
| type=sha | |
| type=raw,value=${{ steps.versions.outputs.version_string }} | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=ref,event=branch | |
| labels: | | |
| org.opencontainers.image.title=${{ matrix.context }} | |
| org.opencontainers.image.description=Docker image for ${{ matrix.context }} | |
| org.opencontainers.image.vendor=GraphOps | |
| org.opencontainers.image.versions=${{ steps.versions.outputs.versions }} | |
| - name: Check if context changed | |
| uses: dorny/paths-filter@v2 | |
| id: changes | |
| with: | |
| filters: | | |
| src: | |
| - 'dockerfiles/${{ matrix.context }}/**' | |
| - '.github/workflows/builds.yaml' | |
| - 'scripts/extract-versions.sh' | |
| - name: Login to GitHub Container Registry | |
| if: steps.changes.outputs.src == 'true' && github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| if: steps.changes.outputs.src == 'true' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./dockerfiles/${{ matrix.context }} | |
| platforms: linux/amd64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| provenance: false |