Skip to content

Commit

Permalink
Setting secret as env var in workflow file
Browse files Browse the repository at this point in the history
Setting the geofabrik api key as an environment variable prior to running compose. Hopefully, this will pull the secret properly and allow it to be used in the workflow.
  • Loading branch information
nataliejschultz committed Oct 19, 2023
1 parent a6be71a commit 451a428
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/nominatim-docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: nominatim-docker-test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_call:
secrets:
DOCKER_USER:
description: "Docker user known working secret test"
required: true
# workflow_call:
# secrets:
# DOCKER_USER:
# description: "Docker user known working secret test"
# required: true
push:
paths:
- 'emission/integrationTests/docker-compose.yml'
Expand All @@ -23,6 +23,8 @@ on:

# Run every Sunday at 4:05 am
- cron: '5 4 * * 0'
env:
GEOFABRIK_API: ${{ secrets.GEOFABRIK_API }}
jobs:
# This workflow contains a single job called "build"
build:
Expand All @@ -41,6 +43,6 @@ jobs:

# Passes the geofabrik key into the docker-compose.yml file.
- name: Test nominatim.py
run: GFBK_KEY=${{ secrets.DOCKER_USER }} docker-compose -f emission/integrationTests/docker-compose.yml up --exit-code-from web-server
run: GFBK_KEY=$GEOFABRIK_API docker-compose -f emission/integrationTests/docker-compose.yml up --exit-code-from web-server


0 comments on commit 451a428

Please sign in to comment.