Skip to content

Update Versions

Update Versions #69899

name: Update Versions
on:
schedule:
- cron: "*/30 * * * *"
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install NPM dependencies
run: npm ci
- name: Fetch versions
run: npm run fetchVersions
- name: Branch protection OFF
uses: octokit/[email protected]
with:
route: PUT /repos/:repository/branches/master/protection
repository: ${{ github.repository }}
required_status_checks: |
null
enforce_admins: |
null
required_pull_request_reviews: |
null
restrictions: |
null
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_ADMIN_CI_TOKEN }}
- name: Commit changes
run: |
if [[ -n $(git status -s) ]]
then
git config --global user.name 'UI5.Bot'
git config --global user.email '[email protected]'
git commit -am "Automatic versions update"
git push
else
echo "NO CHANGES! SKIPPING COMMIT & PUSH!"
fi
- name: Branch protection ON
uses: octokit/[email protected]
with:
route: PUT /repos/:repository/branches/master/protection
repository: ${{ github.repository }}
required_status_checks: |
strict: true
contexts:
- Travis CI - Pull Request
- license/cla
enforce_admins: |
null
required_pull_request_reviews: |
null
restrictions: |
null
allow_force_pushes: |
true
required_linear_history: |
true
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_ADMIN_CI_TOKEN }}