Skip to content

trigger-workflow

trigger-workflow #17

Workflow file for this run

name: Respond to linter trigger
on:
repository_dispatch:
types: [trigger-workflow]
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
if: github.repository == 'flathub/org.flatpak.Builder'
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run update script
run: |
echo ${{ github.event.client_payload.sha }}
LINTER_SHA=${{ github.event.client_payload.sha }} python3 .github/scripts/rewrite-manfiest.py
- name: Create pull request
if: ${{ success() }}
id: create-pr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.FP_BUILDER_FLATHUBBOT_TOKEN }}
branch-suffix: "random"
commit-message: |
(Automated) Bump linter
Bump linter to ${{ github.event.client_payload.sha }}
title: "(Automated) Bump linter"
body: |
Bump linter to ${{ github.event.client_payload.sha }}
delete-branch: true
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- name: Pause for a while
if: ${{ steps.create-pr.outputs.pull-request-number }}
run: sleep 200
- name: Set auto-merge
if: ${{ steps.create-pr.outputs.pull-request-number }}
run: gh pr merge --rebase --auto ${{ steps.create-pr.outputs.pull-request-number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}