.github/workflows/awx.yml #2
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: Hourly Workflow | |
on: | |
schedule: | |
- cron: '0 * * * *' # Run every hour | |
push: | |
branches: | |
- main # Adjust the branch as needed | |
jobs: | |
your-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up GitHub CLI | |
uses: actions/setup-gh@v0 | |
with: | |
gh-version: 'latest' # You can specify a version if needed | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x # Choose your Python version | |
- name: Run Python Script | |
run: | | |
gh --version # Check GitHub CLI version (optional) | |
python awxdraft.py | |
env: | |
GH_TOKEN: ${{ secrets.AWX_TOKEN }} |