-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (52 loc) · 1.79 KB
/
update-items.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
name: Update & Upload items.json to Firebase
on:
push:
branches:
- main
schedule:
- cron: "*/20 * * * *"
jobs:
update_and_upload:
if: (github.event_name != 'push' || !contains(github.event.head_commit.message, 'dependabot')) && !contains(github.event.head_commit.message, 'ci skip')
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Cache pnpm Modules
uses: actions/cache@v4
with:
path: ~/.local/share/pnpm/store
key: pnpm-cache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-cache-
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.0.0
run_install: true
- name: Update items.json
id: update_items
run: node updater/update_items.mjs
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_ADMIN_IDS: ${{ secrets.DISCORD_ADMIN_IDS }}
FORCE_UPLOAD: ${{ contains(github.event.head_commit.message, 'force upload') && github.event_name == 'push' }}
PROXY_AUTH: ${{ secrets.PROXY_AUTH }}
- name: Authenticate Firebase
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- name: Upload items.json to Firebase
uses: google-github-actions/upload-cloud-storage@v2
if: steps.update_items.outputs.updated == 'true'
with:
path: items.json
destination: framehub-f9cfb.appspot.com
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: steps.update_items.outputs.updated == 'true'
with:
name: items.json
path: items.json