komikku/.github/workflows/build_dispatch_preview.yml
renovate[bot] 1ffeebc9a1
chore(deps): update github actions (#1524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-30 18:21:07 +07:00

62 lines
1.8 KiB
YAML

name: Remote Dispatch Preview Build
# Manually send a dispatch to build preview
on:
# Dispatch or Manual triggers
workflow_dispatch:
# push:
# branches:
# - master
# # - develop
# paths:
# - '**'
# - '!**.md'
# - '!.github/**'
# - '.github/scripts/**'
# - '.github/workflows/**'
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
trigger_preview_build:
name: Trigger preview build
runs-on: 'ubuntu-24.04'
steps:
- name: Clone repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Prepare build
id: prepare_build
run: |
commit_count=$(git rev-list --count HEAD)
echo "COMMIT_COUNT=$commit_count"
echo "COMMIT_COUNT=$commit_count" >> $GITHUB_OUTPUT
- name: Create Tag 'r${{ steps.prepare_build.outputs.COMMIT_COUNT }}'
if: ${{ github.ref }} == "refs/heads/master"
run: |
git tag "r${{ steps.prepare_build.outputs.COMMIT_COUNT }}"
git push origin "r${{ steps.prepare_build.outputs.COMMIT_COUNT }}"
echo "New tag created: r${{ steps.prepare_build.outputs.COMMIT_COUNT }}"
- name: Get branch names
id: branch_names
uses: tj-actions/branch-names@5250492686b253f06fa55861556d1027b067aeb5 # v9.0.2
- name: Invoke workflow in preview repo
uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1.3.2
with:
workflow: build_app.yml
repo: komikku-app/komikku-preview
ref: "refs/heads/main"
token: "${{ secrets.BOT_PAT }}"
inputs: '{ "git-ref": "${{ steps.branch_names.outputs.current_branch }}" }'