Skip to content

Commit

Permalink
(chore): Add gyb compile workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
N3v1 committed Sep 15, 2024
1 parent 4a8d184 commit 6793473
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/compile_gyb_sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Compile gyb sources 🚀

on:
workflow_dispatch:
inputs:
trigger:
description: "Manually trigger the workflow"
required: true
default: "true"
push:
branches:
- main
paths:
- ".github/workflows/compile_gyb_sources.yml"
- "utils/generate_sources.sh"
- "*.swift.gyb"
- "*.mm.gyb"
pull_request:
branches:
- main

jobs:
compile_gyb_sources:
runs-on: macOS-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run generate_sources.sh
run: |
chmod +x ./utils/generate_sources.sh
./utils/generate_sources.sh
- name: Check for changes
id: check_changes
run: |
git diff --exit-code || echo "Changes detected" > changes.txt
- name: Commit and push changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add .
git commit -m "(automated/ci): Generate missing swift.gyb Sources"
git push origin HEAD:automated-update-contributors
- name: Install GitHub CLI on macOS
run: |
brew install gh
- name: Create Pull Request
if: steps.check_changes.outputs.changed == 'true'
run: |
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
gh pr create --title "Automated update of CONTRIBUTORS.md" \
--body "This pull request updates the CONTRIBUTORS.md file with the latest contributor information." \
--base main \
--head automated-update-contributors \
--repo ${{ github.repository }}

0 comments on commit 6793473

Please # to comment.