Skip to content

Commit

Permalink
Upload ruc.db to a file server
Browse files Browse the repository at this point in the history
  • Loading branch information
blasferna committed Dec 12, 2022
1 parent a1e86d1 commit 9f4d872
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
run: |
cd data && python download.py
- name: Upload ruc
run: |
cd data && curl -T ruc.db ${{ secrets.RUC_DB_URL }} -u "${{secrets.RUC_USER}}:${{secrets.RUC_PASSWORD}}"
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Download people database
run: wget ${{ secrets.PEOPLE_DB_URL }} -P data/

- name: Download ruc database
run: wget --user ${{ secrets.RUC_USER }} --password ${{ secrets.RUC_PASSWORD }} ${{ secrets.RUC_DB_URL }} -P data/

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
Expand Down
2 changes: 1 addition & 1 deletion data/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def build_database():
def build_sqlite3():
con = sqlite3.connect("ruc.db")
cur = con.cursor()
cur.execute("DROP TABLE ruc")
cur.execute("DROP TABLE IF EXISTS ruc")
cur.execute(
"""CREATE TABLE ruc
(ruc text, razonsocial text, tipo text, categoria text, dv text, estado text)"""
Expand Down

0 comments on commit 9f4d872

Please sign in to comment.