Skip to content

Update & Upload items.json to Firebase #83578

Update & Upload items.json to Firebase

Update & Upload items.json to Firebase #83578

Workflow file for this run

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@v3
- name: Cache pnpm Modules
uses: actions/cache@v3
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@v1
if: steps.update_items.outputs.updated == 'true'
with:
path: items.json
destination: framehub-f9cfb.appspot.com
- name: Upload Artifact
uses: actions/upload-artifact@v3
if: steps.update_items.outputs.updated == 'true'
with:
name: items.json
path: items.json