Sync README.md #316
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: Sync README.md | |
on: | |
workflow_dispatch: ## on button click | |
schedule: | |
- cron: '0 */8 * * *' ## every 8 hours | |
push: | |
branches: | |
- main | |
jobs: | |
syncReadme: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- | |
name: Local changes | |
shell: bash | |
env: | |
CHART_BASE_URL: 'https://helm-charts.itboon.top' | |
run: '.github/sync-readme.sh' | |
- | |
name: Commit files | |
shell: bash | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
git add docs/ | |
if [[ -n "$(git status -s)" ]]; then | |
git commit -a -m "Update docs" | |
else | |
echo "No changes" | |
fi | |
- | |
name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |