Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Update Submodules

Update Submodules #703

name: Update submodule
on:
schedule:
- cron: '0 */4 * * *'
workflow_dispatch:
jobs:
updateSubmodule:
runs-on: ubuntu-latest
steps:
- name: Checkout llvm-swift-5.7.2-RELEASE
uses: actions/checkout@v3
with:
ref: 'llvm-swift-5.7.2-RELEASE'
submodules: 'recursive'
- name: Set Git config
run: |
git config user.name 'Submodule AutoUpdater'
git config user.email 'actions@users.noreply.github.com'
- name: Update submodule llvm-swift-5.7.2-RELEASE
id: swift572
run: |
git submodule update --remote
if [ -n "$(git status --porcelain)" ]; then
echo "Some files have been modified"
echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT
git add .
git commit -m "update submodule"
fi
- name: Push changes llvm-swift-5.7.2-RELEASE
if: ${{ steps.swift572.outputs.HAS_CHANGES == '1' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: llvm-swift-5.7.2-RELEASE
- name: Checkout llvm-swift-5.8-RELEASE
uses: actions/checkout@v3
with:
ref: 'llvm-swift-5.8-RELEASE'
submodules: 'recursive'
- name: Set Git config
run: |
git config user.name 'Submodule AutoUpdater'
git config user.email 'actions@users.noreply.github.com'
- name: Update submodule llvm-swift-5.8-RELEASE
id: swift58
run: |
git submodule update --remote
if [ -n "$(git status --porcelain)" ]; then
echo "Some files have been modified"
echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT
git add .
git commit -m "update submodule"
fi
- name: Push changes llvm-swift-5.8-RELEASE
if: ${{ steps.swift58.outputs.HAS_CHANGES == '1' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: llvm-swift-5.8-RELEASE
- name: Checkout llvm-15.0.2rel
uses: actions/checkout@v3
with:
ref: 'llvm-15.0.2rel'
submodules: 'recursive'
- name: Set Git config
run: |
git config user.name 'Submodule AutoUpdater'
git config user.email 'actions@users.noreply.github.com'
- name: Update submodule llvm-15.0.2rel
id: llvm1502
run: |
git submodule update --remote
if [ -n "$(git status --porcelain)" ]; then
echo "Some files have been modified"
echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT
git add .
git commit -m "update submodule"
fi
- name: Push changes llvm-15.0.2rel
if: ${{ steps.llvm1502.outputs.HAS_CHANGES == '1' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: llvm-15.0.2rel
- name: Checkout llvm-16.0.0rel
uses: actions/checkout@v3
with:
ref: 'llvm-16.0.0rel'
submodules: 'recursive'
- name: Set Git config
run: |
git config user.name 'Submodule AutoUpdater'
git config user.email 'actions@users.noreply.github.com'
- name: Update submodule llvm-16.0.0rel
id: llvm1600
run: |
git submodule update --remote
if [ -n "$(git status --porcelain)" ]; then
echo "Some files have been modified"
echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT
git add .
git commit -m "update submodule"
fi
- name: Push changes llvm-16.0.0rel
if: ${{ steps.llvm1600.outputs.HAS_CHANGES == '1' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: llvm-16.0.0rel