Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions .github/workflows/api.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/daily-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow automates daily imports of new releases for legacy packages.
name: Daily Jobs

# The importer is run every day at 07:00 UTC and can also be run manually from
# the 'Actions' tab.
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"

jobs:
build:
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@v4
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@v4
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-2-${{ env.NOW }}
restore-keys: |
cache-2-
path: |
scratch/.cache

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v21
with:
github-token: ${{ env.PACCHETTIBOTTI_TOKEN }}
determinate: false

- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v13

- name: Detect and transfer packages which have new owners
run: nix run .#package-transferrer submit

- name: Detect and publish GitHub packages with new tags
run: nix run .#daily-importer submit

- name: Update the package sets with new versions
run: nix run .#package-set-updater submit
65 changes: 0 additions & 65 deletions .github/workflows/importer.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/process-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Process Registry Issue

on:
issues:
types: [opened]
issue_comment:
types: [created]

jobs:
process:
# Only run on issues, not PRs
if: ${{ !github.event.issue.pull_request }}
permissions:
issues: write
contents: read
runs-on: ubuntu-latest

steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v21
with:
determinate: false

- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v13

- name: Checkout registry-dev
uses: actions/checkout@v4
with:
repository: purescript/registry-dev
ref: master

- name: Process issue
env:
GITHUB_EVENT_PATH: ${{ github.event_path }}
PACCHETTIBOTTI_TOKEN: ${{ secrets.PACCHETTIBOTTI_TOKEN }}
PACCHETTIBOTTI_ED25519: ${{ secrets.PACCHETTIBOTTI_ED25519 }}
PACCHETTIBOTTI_ED25519_PUB: ${{ secrets.PACCHETTIBOTTI_ED25519_PUB }}
run: |
nix run .#github-importer