-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (50 loc) · 2.01 KB
/
vsmarketplace.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
name: Auto update vsmarketplace extensions
on:
push:
paths:
- cells/fog/pkgs/misc/vscode-extensions/vsmarketplace.toml
workflow_dispatch:
inputs:
max_page:
type: string
description: Number of pages to update.
required: true
default: '1'
schedule:
# Update every 24 hours
- cron: "0 0 */1 * *"
jobs:
update_pkgs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Cache nvfetcher
uses: actions/cache@v3
with:
path: ~/.local/share/nvfetcher
key: ${{ runner.os }}-nvfetcher
- name: Install latest nix
uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
substituters = https://cache.nixos.org https://nix-community.cachix.org https://fog.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= fog.cachix.org-1:FAxiA6qMLoXEUdEq+HaT24g1MjnxdfygrbrLDBp6U/s=
nix_path: nixpkgs=channel:nixos-unstable
- name: Setup nix drv cache
uses: cachix/cachix-action@v12
with:
name: fog
skipPush: true
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Quick eval
run: nix develop --show-trace --print-build-logs --command evalnix
- name: Create fog cache
run: nix develop --show-trace --print-build-logs --command fog makeFogCache
- name: Clean up old nvfetcher extracts
run: nix develop --show-trace --print-build-logs --command fog nvfetcher-cleanup vsmarketplace
- name: Update vsmarketplace extension sources
run: nix develop --show-trace --print-build-logs --command fog vsmarketplace-updater ${{ inputs.max_page }}
- name: Update all vsmarketplace extensions
run: nix develop --show-trace --print-build-logs --command fog updateSources misc/vscode-extensions/vsmarketplace
- name: Push changes to main
run: git pull --rebase --autostash && git push