Schedule Job using Carbon Aware API #28
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: Schedule Job using Carbon Aware API | |
on: | |
push: | |
branches: | |
- gh-pages | |
workflow_dispatch: | |
jobs: | |
schedule-job: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- uses: jhcoll/carbon-aware-schedule-action@main | |
with: | |
region: 'eastus' | |
template-paths: 'templates/template.yml' | |
- name: Commit scheduled workflow | |
run: | | |
git config --global user.name 'jhcoll' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/jhcoll/blog | |
git checkout "${GITHUB_REF:11}" | |
git add .github/workflows/template.yml | |
git commit -m "scheduled workflow" | |
git push |