komikku/.github/workflows/build_push_preview.yml
dependabot[bot] 5c8520d619
Bump gradle/wrapper-validation-action from 1 to 3 (#7)
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 1 to 3.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/v1...v3)
[skip ci]
---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 01:35:01 +07:00

61 lines
1.6 KiB
YAML

name: Remote Dispatch Preview Build
on:
# Dispatch or Manual triggers
workflow_dispatch:
push:
branches:
- master
# - develop
paths:
- '**'
- '!**.md'
- '!.github/**'
- '.github/scripts/**'
- '.github/workflows/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
trigger_preview_build:
name: Trigger preview build
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Prepare build
id: prepare_build
run: |
set -e
commit_count=$(git rev-list --count HEAD)
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 }}"
- name: Get branch names
id: branch_names
uses: tj-actions/branch-names@v8
- name: Invoke workflow in preview repo
uses: benc-uk/workflow-dispatch@v1
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 }}" }'