2024-07-16 11:40:25 +02:00
|
|
|
name: Run sipify
|
2024-07-11 09:08:34 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
issue_comment:
|
|
|
|
types: [created]
|
2024-07-16 11:58:08 +02:00
|
|
|
workflow_dispatch:
|
2024-07-16 11:40:25 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- release-*
|
2024-07-11 09:08:34 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
sipify:
|
2024-07-16 11:58:08 +02:00
|
|
|
if: github.event_name != 'issue_comment' || ( contains(github.event.comment.html_url, '/pull/') && github.event.comment.body == '/sipify' )
|
2024-07-11 09:08:34 +02:00
|
|
|
runs-on: [ubuntu-latest]
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Get PR branch
|
|
|
|
uses: alessbell/pull-request-comment-branch@v2.1.0
|
2024-07-16 11:40:25 +02:00
|
|
|
if: ${{ github.event_name == 'issue_comment' }}
|
2024-07-11 09:08:34 +02:00
|
|
|
id: comment-branch
|
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
2024-07-16 11:40:25 +02:00
|
|
|
ref: ${{ steps.comment-branch.outputs.head_ref || github.ref_name }}
|
|
|
|
repository: ${{ steps.comment-branch.outputs.head_owner || 'qgis' }}/${{ steps.comment-branch.outputs.head_repo || 'QGIS' }}
|
2024-07-11 09:08:34 +02:00
|
|
|
token: ${{ secrets.GH_TOKEN_BOT }}
|
|
|
|
|
|
|
|
- name: Install Requirements
|
|
|
|
run: |
|
|
|
|
sudo apt install -y \
|
|
|
|
cpanminus \
|
|
|
|
libyaml-tiny-perl \
|
|
|
|
libio-socket-ssl-perl \
|
|
|
|
libhttp-date-perl \
|
|
|
|
libgetopt-long-descriptive-perl \
|
|
|
|
libmoo-perl \
|
|
|
|
libnamespace-clean-perl \
|
|
|
|
libpath-tiny-perl \
|
|
|
|
libpod-constants-perl \
|
|
|
|
libscalar-list-utils-perl \
|
|
|
|
libsort-key-perl \
|
|
|
|
libstrictures-perl \
|
|
|
|
libstring-escape-perl \
|
|
|
|
libtry-tiny-perl
|
|
|
|
|
|
|
|
- name: run sipify
|
2024-07-16 11:40:25 +02:00
|
|
|
run: ./scripts/sipify_all.sh -m
|
2024-07-11 09:08:34 +02:00
|
|
|
|
|
|
|
- name: commit
|
|
|
|
run: |
|
|
|
|
git config user.name qgis-bot
|
|
|
|
git config user.email bot@qgis.org
|
|
|
|
git add .
|
2024-07-16 12:32:08 +02:00
|
|
|
git commit -m "auto sipify 🍺" || echo "nothing to commit"
|
2024-07-11 09:08:34 +02:00
|
|
|
git push
|