Skip to content

Pass GITHUB_PAT from workflow to docker to authenticate new API-based date fetching #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/s3_upload_ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
password: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }}

- name: Deploy score files to S3 bucket
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
make deploy

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ PWD=$(shell pwd)
.DEFAULT_GOAL:=build
S3_URL=https://forecast-eval.s3.us-east-2.amazonaws.com
S3_BUCKET=s3://forecast-eval
# If not already set in calling environment, set PAT to an empty value.
GITHUB_PAT?=

# Change `imageTag` during `make` call via `make <command> imageTag=<tag name>`
#
Expand Down Expand Up @@ -46,6 +48,7 @@ score_forecast: r_build dist pull_data
-v ${PWD}/Report:/var/forecast-eval \
-v ${PWD}/dist:/var/dist \
-w /var/forecast-eval \
-e GITHUB_PAT \
forecast-eval-build \
Rscript create_reports.R --dir /var/dist

Expand Down