2022-01-17 11:18:00 +00:00
|
|
|
name: "Flakes: Hourly import to Elasticsearch"
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 * * * *'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
import-flakes:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
2022-01-24 17:47:19 +00:00
|
|
|
fail-fast: false
|
2022-01-17 11:18:00 +00:00
|
|
|
matrix:
|
|
|
|
group:
|
|
|
|
- "manual"
|
|
|
|
|
|
|
|
env:
|
|
|
|
RUST_LOG: debug
|
|
|
|
FI_ES_EXISTS_STRATEGY: recreate
|
|
|
|
FI_ES_URL: ${{ secrets.ELASTICSEARCH_URL }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checking out the repository
|
2022-03-02 11:05:42 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-17 11:18:00 +00:00
|
|
|
|
2022-02-27 23:10:09 +00:00
|
|
|
- name: Setup
|
|
|
|
uses: ./.github/actions/common-setup
|
2022-01-17 11:18:00 +00:00
|
|
|
with:
|
2022-02-27 23:10:09 +00:00
|
|
|
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }}
|
2022-01-17 11:18:00 +00:00
|
|
|
|
2022-02-28 15:16:33 +00:00
|
|
|
|
2022-01-17 11:18:00 +00:00
|
|
|
|
|
|
|
- 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'
|