Skip to content

Commit

Permalink
Merge pull request #38 from Financial-Times/fix/UPPSF-4347-set-env-var
Browse files Browse the repository at this point in the history
Fix/uppsf 4347 set env var
  • Loading branch information
epavlova authored Apr 11, 2023
2 parents 6f134bf + 36d0f59 commit ce8898f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
11 changes: 8 additions & 3 deletions src/commands/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ parameters:
type: env_var_name
default: GITHUB_TOKEN
steps:
- run:
name: Set env vars from GITHUB_USERNAME
command: >
export GITHUB_USERNAME=${<<parameters.github-username>>}
- run:
name: Set env vars from GITHUB_TOKEN
command: >
export GITHUB_TOKEN=${<<parameters.github-token>>}
- run:
name: Build source
environment:
GITHUB_USERNAME: <<parameters.github-username>>
GITHUB_TOKEN: <<parameters.github-token>>
command: <<include(scripts/build-source.sh)>>
11 changes: 8 additions & 3 deletions src/jobs/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ docker:
steps:
- checkout
- setup_remote_docker
- run:
name: Set env vars from GITHUB_USERNAME
command: >
export GITHUB_USERNAME=${<<parameters.github-username>>}
- run:
name: Set env vars from GITHUB_TOKEN
command: >
export GITHUB_TOKEN=${<<parameters.github-token>>}
- run:
name: Build Dockerfile
environment:
GITHUB_USERNAME: <<parameters.github-username>>
GITHUB_TOKEN: <<parameters.github-token>>
command: <<include(scripts/build-dockerfile.sh)>>
2 changes: 1 addition & 1 deletion src/jobs/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:
command: git config --global --unset url."ssh://[email protected]".insteadOf
- run:
name: Set GITHUB_USERNAME and GITHUB_TOKEN
command: <<include(scripts/build-source.sh)>>
command: <<include(scripts/set-git-creds.sh)>>
- snyk/scan:
monitor-on-build: true
project: << parameters.project >>
Expand Down

0 comments on commit ce8898f

Please sign in to comment.