media-kit/.forgejo/workflows/ci.yml
liyunze d71e06ea39
All checks were successful
Deploy Media Kit / deploy (push) Successful in 13s
added ci
2026-11-05 23:06:35 +08:00

29 lines
1.2 KiB
YAML

name: CI
# pull_request_target always runs this file from the base branch. A pull request
# cannot replace these steps, which is what `pull_request` would allow after
# someone clicks Approve on a fork.
#
# Forks are not built until a maintainer adds the `ci` label. Review Dockerfile,
# the frontend package files, and the backend Cargo files before adding it. New
# commits do not reuse that label; remove it and add it again after reviewing.
on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
jobs:
check:
if: |
forgejo.event.pull_request.head.repo.full_name == forgejo.repository ||
(forgejo.event.action == 'label_updated' && forgejo.event.label.name == 'ci')
runs-on: native
steps:
- name: Checkout pull request
uses: https://data.forgejo.org/actions/checkout@v4
with:
repository: ${{ forgejo.event.pull_request.head.repo.full_name }}
ref: ${{ forgejo.event.pull_request.head.sha }}
persist-credentials: false
- name: Build application image
run: docker build --pull --tag media-kit:ci .