Flag Retractions #58
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: Flag Retractions | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
remove-retractions: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Authenticate to Google Cloud" | |
id: "auth" | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: "${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
# TODO: base on an actual release | |
run: python -m pip install tqdm httpx gcsfs leap-data-management-utils==0.0.5 | |
- name: "Run retraction script" | |
shell: bash | |
run: | | |
python scripts/retraction.py | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS: "${{ steps.auth.outputs.credentials_file_path }}" | |
rerun-failed-jobs: | |
runs-on: ubuntu-latest | |
needs: [remove-retractions] | |
if: failure() | |
steps: | |
- name: Rerun failed jobs in the current workflow | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh run rerun ${{ github.run_id }} --failed |