Skip to content

feat: Perform test runs on pull requests #27

feat: Perform test runs on pull requests

feat: Perform test runs on pull requests #27

Workflow file for this run

name: Update Postman Collection Nightly
on:
# Run every Monday at 1PM UTC (9AM EST)
schedule:
- cron: "0 13 * * 1"
# Allow manual triggering from the Actions tab
workflow_dispatch:
# Run when a pull request is opened to verify.
pull_request:
types: [opened, synchronize]
# Jobs to be executed
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v2
# Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# Install the requests library to make HTTP requests
- name: Install dependencies
run: pip install requests
# Execute the Python script to generate the collection
- name: Execute Python script
env:
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
run: python generate.py
# Commit any changes to the collection
- uses: stefanzweifel/git-auto-commit-action@v5
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: 'ci: Update Postman Collection'
branch: main
commit_user_name: Github-Actions 🤖
commit_user_email: [email protected]
commit_author: Github-Actions🤖 <[email protected]>
# Keep the workflow alive
- uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings
if: github.event_name != 'pull_request'