From fda96bda40dbb90b7e9645f36fd7daa7d7f03205 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Sat, 23 May 2020 00:13:55 +0200 Subject: [PATCH] run import-channel every hour for last 3 channels (#48) --- .github/workflows/cron.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cron.yml diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..ed1fd84 --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,26 @@ +name: "Hourly import channel to Elasticsearch" +on: + schedule: + - cron: '0 * * * *' +jobs: + hourly-import-channel: + runs-on: ubuntu-latest + strategy: + matrix: + channel: + - nixos-unstable + - nixos-20.03 + - nixos-19.09 + fail-fast: true + steps: + - name: Checking out the repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Installing Nix + uses: cachix/install-nix-action@v8 + - name: Import ${{ matrix.channel }} channel + run: | + cd scripts/ + ./import-channel --es-url ${{ secrets.ELASTICSEARCH_URL }} --channel ${{ matrix.channel }} -vvv + if: github.repository == 'NixOS/nixos-search'