Update #124573
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: Update | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '*/15 * * * *' | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout OpenShift Data | |
uses: actions/checkout@v3 | |
with: | |
repository: 'openshift/cincinnati-graph-data' | |
path: cincinnati-graph-data | |
- name: Update streams | |
run: .github/scripts/update_streams.sh | |
- name: Update data | |
run: .github/scripts/update_data.sh | |
- name: Update sitemap | |
run: .github/scripts/update_sitemap.sh | |
- name: Commit changes | |
run: | | |
git config --global user.name "GitHub update workflow" | |
git config --global user.email '[email protected]' | |
git add -A | |
if ! git diff --cached --exit-code; then | |
echo "Changes have been detected, commit and push ..." | |
git commit -am "Automatic update ($GITHUB_RUN_ID/$GITHUB_RUN_NUMBER)" | |
git log --graph --abbrev-commit --date=relative -n 5 | |
git push | |
else | |
echo "No changes have been detected since last build, nothing to publish" | |
fi |