2023-01-18 18:19:39 +00:00
|
|
|
name: Update dependencies
|
2023-03-13 15:18:01 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-01-18 18:19:39 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 2 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-dependencies:
|
2023-03-13 15:18:01 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2023-03-20 13:06:58 +00:00
|
|
|
pull-requests: write
|
2023-01-18 18:19:39 +00:00
|
|
|
name: Update dependencies
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
# Checkout the depot tools they are needed by roll_deps.sh
|
|
|
|
- name: Checkout depot tools
|
|
|
|
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
|
|
|
|
|
|
- name: Update PATH
|
2023-08-04 22:01:50 +00:00
|
|
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
2023-01-18 18:19:39 +00:00
|
|
|
|
|
|
|
- name: Download dependencies
|
|
|
|
run: python3 utils/git-sync-deps
|
|
|
|
|
|
|
|
- name: Setup git user information
|
|
|
|
run: |
|
2023-01-19 00:49:07 +00:00
|
|
|
git config user.name "GitHub Actions[bot]"
|
2023-01-18 18:19:39 +00:00
|
|
|
git config user.email "<>"
|
|
|
|
git checkout -b roll_deps
|
|
|
|
|
|
|
|
- name: Update dependencies
|
|
|
|
run: |
|
|
|
|
utils/roll_deps.sh
|
|
|
|
if [[ `git diff HEAD..origin/main --name-only | wc -l` == 0 ]]; then
|
|
|
|
echo "changed=false" >> $GITHUB_OUTPUT
|
|
|
|
else
|
|
|
|
echo "changed=true" >> $GITHUB_OUTPUT
|
|
|
|
fi
|
|
|
|
id: update_dependencies
|
|
|
|
- name: Push changes and create PR
|
|
|
|
if: steps.update_dependencies.outputs.changed == 'true'
|
|
|
|
run: |
|
|
|
|
git push --force --set-upstream origin roll_deps
|
2023-08-15 13:53:10 +00:00
|
|
|
# Create a PR. If it aready exists, the command fails, so ignore the return code.
|
2023-09-12 00:24:32 +00:00
|
|
|
gh pr create --base main -f -r KhronosGroup/spirv-tools-autoroll || true
|
2023-08-15 13:53:10 +00:00
|
|
|
# Add the 'kokoro:run' label so that the kokoro tests will be run.
|
|
|
|
gh pr edit --add-label 'kokoro:run'
|
|
|
|
gh pr merge --auto --squash
|
2023-01-18 18:19:39 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|