-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (55 loc) · 2.26 KB
/
api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow automates triggering operations of the registry API
name: Registry API
on:
issues:
# No 'edited' because new builds should be triggered by new comments.
types: [opened]
issue_comment:
types: [created]
jobs:
api:
# This condition is here because the issue_comment event is triggered
# for pull requests as well, but we want to ignore those.
# The second part is so that we don't start a workflow if the author of an
# issue comment is pacchettibotti itself.
if: ${{ (!github.event.issue.pull_request) && (github.actor != 'pacchettibotti') }}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PACCHETTIBOTTI_TOKEN }}
PACCHETTIBOTTI_TOKEN: ${{ secrets.PACCHETTIBOTTI_TOKEN }}
PACCHETTIBOTTI_ED25519_PUB: ${{ secrets.PACCHETTIBOTTI_ED25519_PUB }}
PACCHETTIBOTTI_ED25519: ${{ secrets.PACCHETTIBOTTI_ED25519 }}
SPACES_KEY: ${{ secrets.SPACES_KEY }}
SPACES_SECRET: ${{ secrets.SPACES_SECRET }}
DHALL_TYPES: "./types"
HEALTHCHECKS_URL: "N/A"
steps:
# Checks out the registry-dev repository so we can run scripts from it
- uses: actions/checkout@v3
with:
repository: purescript/registry-dev
token: ${{ env.PACCHETTIBOTTI_TOKEN }}
ref: 'master'
- name: Set current time
run: echo "NOW=$(date)" >> $GITHUB_ENV
- name: Cache importer artifacts
uses: actions/cache@v2
with:
# This cache directory is meant to be essentially permanent, with cache
# expiry implemented in code. However, we never want this to be a direct
# cache hit, or else new writes to the cache won't be saved. We want a
# partial hit by using a restore-key, which means the cache will always
# be saved with new changes, and will always be restored.
key: cache-1-${{ env.NOW }}
restore-keys: |
cache-1-
path: |
scratch/.cache
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
with:
github-token: ${{ env.PACCHETTIBOTTI_TOKEN }}
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Run the registry API
run: nix run .#github-importer