Fetch Coordinape Data (Daily Cron Job) #351
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: Fetch Coordinape Data (Daily Cron Job) | |
on: | |
# A new interval every day (midnight) | |
schedule: | |
- cron: 0 0 * * * # 00:00 UTC | |
push: | |
branches: | |
# Allows us to test this workflow | |
- "fetch-coordinape-data-trigger-*" | |
jobs: | |
development_guild: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: development-guild/contributions/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Pull changes | |
run: | | |
git fetch | |
git pull | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
cache-dependency-path: development-guild/contributions/package-lock.json | |
- name: Install Node.js Packages 🔧 | |
run: npm install | |
# Fetch Coordinape profiles and store them in a CSV file 🧮 | |
- run: node fetch-profiles.js | |
# Fetch Coordinape contributions and store them in a CSV file 🧮 | |
- run: node fetch-contributions.js | |
- name: Commit Changes | |
run: | | |
git config user.name 'NationCred bot' | |
git config user.email '[email protected]' | |
git add coordinape-profiles.csv | |
git add coordinape-contributions.csv | |
git commit --allow-empty -m '🧙 development guild - fetch coordinape contributions' | |
- name: Push Changes | |
run: git push | |
ops_guild: | |
needs: development_guild | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ops-guild/contributions/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Pull changes | |
run: | | |
git fetch | |
git pull | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
cache-dependency-path: ops-guild/contributions/package-lock.json | |
- name: Install Node.js Packages 🔧 | |
run: npm install | |
# Fetch Coordinape profiles and store them in a CSV file 🧮 | |
- run: node fetch-profiles.js | |
# Fetch Coordinape contributions and store them in a CSV file 🧮 | |
- run: node fetch-contributions.js | |
- name: Commit Changes | |
run: | | |
git config user.name 'NationCred bot' | |
git config user.email '[email protected]' | |
git add coordinape-profiles.csv | |
git add coordinape-contributions.csv | |
git commit --allow-empty -m '⚙️ ops guild - fetch coordinape contributions' | |
- name: Push Changes | |
run: git push | |
marketing_guild: | |
needs: ops_guild | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: marketing-guild/contributions/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Pull changes | |
run: | | |
git fetch | |
git pull | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
cache-dependency-path: marketing-guild/contributions/package-lock.json | |
- name: Install Node.js Packages 🔧 | |
run: npm install | |
# Fetch Coordinape profiles and store them in a CSV file 🧮 | |
- run: node fetch-profiles.js | |
# Fetch Coordinape contributions and store them in a CSV file 🧮 | |
- run: node fetch-contributions.js | |
- name: Commit Changes | |
run: | | |
git config user.name 'NationCred bot' | |
git config user.email '[email protected]' | |
git add coordinape-profiles.csv | |
git add coordinape-contributions.csv | |
git commit --allow-empty -m '🎥 marketing guild - fetch coordinape contributions' | |
- name: Push Changes | |
run: git push | |
ecoride_network: | |
needs: marketing_guild | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ecoride-network/contributions/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Pull changes | |
run: | | |
git fetch | |
git pull | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
cache-dependency-path: ecoride-network/contributions/package-lock.json | |
- name: Install Node.js Packages 🔧 | |
run: npm install | |
# Fetch Coordinape profiles and store them in a CSV file 🧮 | |
- run: node fetch-profiles.js | |
# Fetch Coordinape contributions and store them in a CSV file 🧮 | |
- run: node fetch-contributions.js | |
- name: Commit Changes | |
run: | | |
git config user.name 'NationCred bot' | |
git config user.email '[email protected]' | |
git add coordinape-profiles.csv | |
git add coordinape-contributions.csv | |
git commit --allow-empty -m '🌳 ecoride network - fetch coordinape contributions' | |
- name: Push Changes | |
run: git push | |