aux-search/.github/workflows/import-flakes.yml
dependabot[bot] a5b2b8f0e5
Dependabot(deps): Bump actions/checkout from 2 to 3 (#441)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 12:05:42 +01:00

52 lines
1.2 KiB
YAML

name: "Flakes: Hourly import to Elasticsearch"
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
jobs:
import-flakes:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
group:
- "manual"
env:
RUST_LOG: debug
FI_ES_EXISTS_STRATEGY: recreate
FI_ES_URL: ${{ secrets.ELASTICSEARCH_URL }}
steps:
- name: Checking out the repository
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/common-setup
with:
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }}
- name: Building flake-info
run: |
nix -vL build .#flake-info
- name: Import ${{ matrix.group }} group
run: |
./result/bin/flake-info --push --elastic-schema-version=$(< ./VERSION) group ./flakes/${{ matrix.group }}.toml ${{ matrix.group }}
if: github.repository_owner == 'NixOS'
- name: Warmup ${{ matrix.group }} group
run: |
for (( i = 0; i < 3; i++ )) do
curl -sS ${{ secrets.ELASTICSEARCH_URL }}/latest-$(< VERSION)-group-${{ matrix.group }}/_search | jq -c '.took // .'
done
if: github.repository_owner == 'NixOS'