| # Copyright 2020 Google LLC |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # Creates a PR to update all LLVM-dependent submodules to the current LLVM |
| # commit in the repo. |
| |
| name: Synchronize LLVM Dependents |
| |
| on: |
| workflow_dispatch: |
| schedule: |
| # Every 6 hours at 0, 6, 12, 18 UTC (4, 10, 16, 22 PST) |
| - cron: "0 */6 * * *" |
| |
| jobs: |
| update_llvm_dependents: |
| # Don't run this in everyone's forks. |
| if: github.repository == 'google/iree' |
| runs-on: ubuntu-18.04 |
| steps: |
| - name: Checking out repository |
| uses: actions/checkout@v2 |
| with: |
| ref: "google" |
| - name: Setting git config |
| run: | |
| git config --local user.email "iree-github-actions-bot@google.com" |
| git config --local user.name "Submodule Update Action" |
| - name: Initializing submodules |
| run: ./scripts/git/submodule_versions.py init |
| - name: Updating submodules and creating PR |
| env: |
| # Personal token is required to trigger additional automation (e.g. presubmits). |
| GITHUB_TOKEN: ${{ secrets.GITHUB_WRITE_ACCESS_TOKEN }} |
| UPSTREAM_REMOTE: "origin" |
| PR_BRANCH: "auto_submodule_update" |
| run: ./scripts/git/update_llvm_dependent_submodules.sh |