Slack - rec.gov - tours - python #52896
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
## Sends a slack message | |
## Docs: | |
## * https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges | |
## | |
name: "Slack - rec.gov - tours - python" | |
# on: | |
# # Push is for testing only to allow you to test this workflow without | |
# # a merge and just a push. | |
# push: | |
# pull_request: | |
# types: | |
# - closed | |
on: | |
# Push is for testing only to allow you to test this workflow without | |
# a merge and just a push. | |
# push: | |
# pull_request: | |
# types: | |
# - closed | |
# branches: | |
# - main | |
## Schedule doc: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
schedule: | |
- cron: '*/5 * * * *' | |
# # - cron: '30 5 * * 2,4' | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
SLACK_CHANNEL: 'C05B9LLPVD5' # sf-devops.slack.com - recreation-gov | |
# Enable debug output | |
DEBUG: false | |
# Search 1 | |
FACILITY_ID_1: 251853 | |
TOUR_ID_1: 194 | |
YEAR_1: 2023 | |
MONTH_1: 08 | |
INTERESTED_DATES: 09,10,11 # two digit comman separated dates | |
jobs: | |
check_open_reservations: | |
# if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
pip install slack-sdk | |
- name: Run Script | |
run: | | |
# python3 ./recreation.gov/run_python.py ${FACILITY_ID_1} ${TOUR_ID_1} ${YEAR_1} ${MONTH_1} "${INTERESTED_DATES}" | |
python3 ./recreation.gov/run_python.py 251853 194 2023 08 "01,02,03" |