Skip to content

Update Postman Collection Nightly #180

Update Postman Collection Nightly

Update Postman Collection Nightly #180

Workflow file for this run

name: Update Postman Collection Nightly
on:
# Run every day at midnight
schedule:
- cron: '0 0 * * *'
# 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]>
# Sync the collection with Postman
- name: Sync Postman Collections
uses: jneate/postman-collection-action@v1
with:
postmanApiKey: ${{ secrets.POSTMAN_API_KEY }}
postmanWorkspaceId: d598cc9d-84bf-4e1d-8da2-6ee69c8ecd62
postmanTimeout: 30000
# Keep the workflow alive
- uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings
if: github.event_name != 'pull_request'