Daylight saving fix #55
Workflow file for this run
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: Deploy | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
concurrency: "prod" | |
steps: | |
- uses: 'actions/checkout@v4' | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: ${{ vars.GCP_SERVICE_ACCOUNT }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Run image | |
uses: abatilo/actions-poetry@v2 | |
- name: Install dependencies | |
run: poetry install | |
- name: Test | |
run: poetry run pytest -v | |
- name: Generate Requirements | |
run: poetry export --output=requirements.txt | |
- id: 'deploy' | |
uses: 'google-github-actions/deploy-cloud-functions@v1' | |
with: | |
name: ${{ vars.GCP_CLOUD_FUNCTION_NAME }} | |
runtime: 'python311' | |
entry_point: "update" | |
# TODO put these all in github or all in gcp | |
env_vars: DEVICE_ID=${{ vars.DEVICE_ID}} | |
secret_environment_variables: ASTRAL_LOCATION=projects/${{ steps.auth.outputs.project_id}}/secrets/ASTRAL_LOCATION/versions/latest,SUREPY_AUTH_TOKEN=projects/${{ steps.auth.outputs.project_id}}/secrets/SUREPY_AUTH_TOKEN/versions/latest |