perf(sql): Analyze forecasts on cron #154
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: Build Containers | |
| on: | |
| push: | |
| branches-ignore: ['main'] | |
| paths-ignore: ['README.md', 'examples/**', '.github/workflows/bench.yml', '.github/workflows/test.yml'] | |
| tags: ['v*.*.*'] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-container: | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Buildx | |
| id: setup-buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Extract metadata (tags, labels) for Container | |
| id: meta | |
| uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| - name: Get go paths | |
| id: gopaths | |
| run: echo "path=$(go env GOPATH)" >> "$GITHUB_OUTPUT" | |
| - name: Restore gobin cache | |
| id: cache | |
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: | | |
| ${{ steps.gopaths.outputs.path }}/bin | |
| ${{ steps.gopaths.outputs.path }}/include | |
| key: ${{ runner.os }}-gobin-${{ hashfiles('Makefile') }} | |
| - name: Inject gobin cache | |
| uses: reproducible-containers/buildkit-cache-dance@5b81f4d29dc8397a7d341dba3aeecc7ec54d6361 # v3.3.0 | |
| with: | |
| builder: ${{ steps.setup-buildx.outputs.name }} | |
| cache-map: | | |
| { | |
| "${{ steps.gopaths.outputs.path }}/bin": "/go/bin", | |
| "${{ steps.gopaths.outputs.path }}/include": "/go/include" | |
| } | |
| dockerfile: Containerfile | |
| skip-extraction: ${{ steps.cache.outputs.cache-hit }} | |
| - name: Build and push Docker images | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # 6.18.0 | |
| with: | |
| context: . | |
| file: Containerfile | |
| 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 | |
| env: | |
| DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && '0' || '7' }} | |