1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-06-14 16:39:18 +00:00

chore: Add ability to comment on Prs to simplify checking cards (#729)

This commit is contained in:
2025-05-03 23:33:15 +02:00
committed by GitHub
parent b26236e78c
commit 1eb4c677a7
8 changed files with 610 additions and 6 deletions

View File

@ -3,7 +3,7 @@ name: Build Docker image
on:
push:
branches:
- '*'
- master
pull_request:
branches:
- master
@ -45,7 +45,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
if: ${{ secrets.DOCKERHUB_TOKEN && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
- name: Login to Github Packages
uses: docker/login-action@v3
@ -53,7 +53,7 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
if: ${{ secrets.DOCKER_TOKEN && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@ -65,7 +65,7 @@ jobs:
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Pre build server
run: |
bun install --frozen-lockfile
@ -86,6 +86,5 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
push: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
push: ${{ (secrets.DOCKERHUB_TOKEN || secrets.DOCKER_TOKEN) && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
cache-to: type=gha,mode=max

36
.github/workflows/comment-pr.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Card Info Comment
on:
pull_request:
types: [opened, synchronize]
paths:
- 'data/**/*.ts'
- 'data-asia/**/*.ts'
jobs:
card-info-comment:
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
working-directory: .github/scripts
permissions:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun i --frozen-lockfile
- name: Run load-cards script
id: load-cards
run: bun load-cards.js
env:
INPUT_GITHUB-TOKEN: ${{ secrets.GITHUB_TOKEN }}