Create automatic pr #3665
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create automatic pr | |
# Set your repository name and the branch you want to pull from | |
env: | |
REPO_NAME: "KhronosGroup/SPIRV-Cross" | |
BRANCH: "master" | |
UPSTREAM_BRANCH: "main" | |
NAME: "SPIRV-Cross" | |
on: | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: "0 0 * * *" | |
- cron: "0 6 * * *" | |
- cron: "0 12 * * *" | |
- cron: "0 18 * * *" | |
jobs: | |
Update-Fork: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checking out code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
lfs: true | |
submodules: true | |
clean: false | |
fetch-depth: 0 | |
- name: extract git commit data | |
uses: rlespinasse/git-commit-data-action@v1.x | |
- name: Check for synced branches action | |
id: check | |
uses: MadLadSquad/check-for-synced-branches-action@master | |
with: | |
upstream-url: "https://github.com/${{ env.REPO_NAME }}" | |
first-branch: ${{ env.BRANCH }} | |
second-branch: ${{ env.UPSTREAM_BRANCH }} | |
- name: Test | |
run: "echo '${{ steps.check.outputs.behind }}/${{ steps.check.outputs.ahead }}'" | |
- name: Issue | |
if: steps.check.outputs.behind > 0 | |
uses: JasonEtco/create-an-issue@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACTION_ISSUE_SECRET }} | |
with: | |
filename: .github/auto-issue-template.md | |
update_existing: true | |
search_existing: open |