Check Google Drive Access #16
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: "New Check Google Drive Access" | |
on: | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
env: | |
REPO_OWNER: ${{ github.repository_owner}} | |
REPO_BRANCH: ${{ github.ref_name }} | |
SERVICE_ACCOUNT_KEY_JSON: ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }} | |
GDRIVE_FOLDER: ${{ vars.GDRIVE_FOLDER }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
base: ${{ github.ref }} | |
filters: | | |
devcontainer: | |
- '.devcontainer/**' | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Build dev container | |
if: steps.filter.outputs.devcontainer == 'true' | |
run: | | |
docker build --no-cache --tag ghcr.io/caciviclab/disclosure-backend-static:latest -f ./.devcontainer/Dockerfile . | |
docker push ghcr.io/caciviclab/disclosure-backend-static:latest | |
- name: Test pull from gdrive | |
if: steps.filter.outputs.devcontainer != 'true' | |
uses: ./.github | |
with: | |
entrypoint: python | |
args: test_pull_from_gdrive.py | |
- name: Archive pulled files | |
if: steps.filter.outputs.devcontainer != 'true' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: redacted-netfile-files | |
path: .local/downloads | |