better file write
This commit is contained in:
6
.github/workflows/last-pull.yml
vendored
6
.github/workflows/last-pull.yml
vendored
@@ -35,7 +35,11 @@ jobs:
|
|||||||
run: poetry install
|
run: poetry install
|
||||||
|
|
||||||
- name: Write creds file
|
- name: Write creds file
|
||||||
run: echo "${{ secrets.TWITTER_TOKEN_FILE }}" > token.json
|
run: python -c "import os; import pathlib; pathlib.Path('token.json').write_text(os.environ['TOKEN_FILE'])"
|
||||||
|
|
||||||
- name: Run Update
|
- name: Run Update
|
||||||
run: poetry run update --days-ago 1
|
run: poetry run update --days-ago 1
|
||||||
|
|
||||||
|
- name: Clean Up Token File
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: rm token.json
|
||||||
|
|||||||
7
.github/workflows/update.yml
vendored
7
.github/workflows/update.yml
vendored
@@ -10,6 +10,7 @@ env:
|
|||||||
TWITTER_USER_TOKEN: ${{ secrets.TWITTER_USER_TOKEN }}
|
TWITTER_USER_TOKEN: ${{ secrets.TWITTER_USER_TOKEN }}
|
||||||
TWITTER_USER_TOKEN_SECRET: ${{ secrets.TWITTER_USER_TOKEN_SECRET }}
|
TWITTER_USER_TOKEN_SECRET: ${{ secrets.TWITTER_USER_TOKEN_SECRET }}
|
||||||
SHEET_API_KEY: ${{ secrets.SHEET_API_KEY }}
|
SHEET_API_KEY: ${{ secrets.SHEET_API_KEY }}
|
||||||
|
TOKEN_FILE: ${{ secrets.TOKEN_FILE }}
|
||||||
jobs:
|
jobs:
|
||||||
pull-updates:
|
pull-updates:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -35,7 +36,11 @@ jobs:
|
|||||||
run: poetry install
|
run: poetry install
|
||||||
|
|
||||||
- name: Write creds file
|
- name: Write creds file
|
||||||
run: echo "${{ secrets.TWITTER_TOKEN_FILE }}" > token.json
|
run: python -c "import os; import pathlib; pathlib.Path('token.json').write_text(os.environ['TOKEN_FILE'])"
|
||||||
|
|
||||||
- name: Run Update
|
- name: Run Update
|
||||||
run: poetry run update
|
run: poetry run update
|
||||||
|
|
||||||
|
- name: Clean Up Token File
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: rm token.json
|
||||||
|
|||||||
Reference in New Issue
Block a user