Get Dashboards updates #4
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: Get Dashboards updates | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
update-dashboards: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Current Repository | |
uses: actions/checkout@v4 | |
with: | |
path: current-repo | |
- name: Checkout Kexa Dashboards Repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 'kexa-io/grafana-dashboards' | |
path: external-repo | |
- name: Create Target Directory | |
run: | | |
mkdir -p current-repo/kexa-chart/files/dashboards | |
shell: bash | |
- name: Copy Files | |
run: | | |
cp -f external-repo/*.json current-repo/kexa-chart/files/dashboards/ | |
shell: bash | |
- name: Configure Git | |
run: | | |
git config --global user.name "Adrien E" | |
git config --global user.email "[email protected]" | |
working-directory: current-repo | |
- name: Commit changes | |
run: | | |
git add kexa-chart/files/dashboards/ | |
git commit -m "fix: Get new dashboards" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
working-directory: current-repo |