Update Demo Data #21
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: Update Demo Data | |
on: | |
schedule: | |
# ?????????????? minute (0 - 59) | |
# ? ?????????????? hour (0 - 23) | |
# ? ? ?????????????? day of the month (1 - 31) | |
# ? ? ? ?????????????? month (1 - 12 or JAN-DEC) | |
# ? ? ? ? ?????????????? day of the week (0 - 6 or SUN-SAT) | |
# ? ? ? ? ? | |
# ? ? ? ? ? | |
# ? ? ? ? ? | |
# * * * * * | |
# At 00:00 UTC on Sundays | |
- cron: "0 0 * * 0" | |
# Workflow dispatch trigger allows manually running workflow | |
workflow_dispatch: {} | |
jobs: | |
update-demo-data: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up local Git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
- name: Install underscore library | |
run: npm install underscore --legacy-peer-deps | |
- name: Run the update script | |
run: bash ./update_demo_data.sh | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: "Update CCO Demo Data" | |
title: "Update CCO Demo Data" | |
body: "Updated CCO Demo from GitHub Actions Workflow [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" | |
branch: "task/update-cco-demo-data" | |
delete-branch: true | |
labels: "automation, data" | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |