data-update #337
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: data-update | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 17 * * *" | |
jobs: | |
get_rss: | |
runs-on: ubuntu-latest | |
name: Update All Data | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
submodules: 'true' | |
ref: production | |
- name: Submodule Update | |
run: | | |
git pull --recurse-submodules | |
git submodule update --remote --recursive | |
- name: RSS to JSON | |
continue-on-error: true | |
uses: I-Valchev/[email protected] | |
with: | |
source: .github/feeds.yaml | |
target: _data/gmc-rss.json | |
- name: Copy Source Data | |
continue-on-error: true | |
run: | | |
rm -f -r "bounties" | |
cp -R "_source/bounties" "." | |
cp "_source/meta/bounty-faq.md" "docs/bounty-faq.md" | |
cp "_source/meta/resources.md" "docs/resources.md" | |
cp "_source/meta/dates.yml" "_data/dates.yml" | |
cp "_source/meta/contacts.yml" "_data/contacts.yml" | |
- name: Create Pull Request | |
id: create-pr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "Automated update of source data via github action" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: temp-data-updates | |
delete-branch: true | |
title: 'Update Source Data' | |
body: "Automated update of source data via github action. Includes add and remove of bounties and update of docs files." | |
- name: Approve Pull Request | |
id: approve-pr | |
if: ${{ steps.create-pr.outputs.pull-request-number }} | |
uses: hmarr/[email protected] | |
with: | |
github-token: ${{ secrets.PAT }} | |
pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }} | |
- name: Merge Pull Request | |
if: ${{ steps.create-pr.outputs.pull-request-number }} | |
uses: juliangruber/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
number: ${{ steps.create-pr.outputs.pull-request-number }} |