Get Latest Templates #40
This file contains hidden or 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 Latest Templates | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| run-script: | |
| name: Get Latest Template | |
| runs-on: ubuntu-latest | |
| environment: Zabbix | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| branch: main | |
| - name: Purge Old YAML | |
| run: rm *.yaml | |
| - name: Download Templates | |
| shell: pwsh | |
| run: '&Scripts/Export-ZabbixTemplates.ps1' | |
| env: | |
| ZBX_APIKEY: ${{ secrets.ZBX_APIKEY }} | |
| ZBX_INSTANCE: ${{ vars.ZBX_INSTANCE }} | |
| - name: Set Git Config | |
| run: | | |
| git config --global user.email automation@belowaverage.org | |
| git config --global user.name "GitHub Workflow" | |
| - name: Add & Commit | |
| run: | | |
| git add -A | |
| git commit -a -m "Downloaded from workflow." | |
| - name: Push | |
| run: git push |