Skip to content

Commit

Permalink
Switch to pull non-secret values from env (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Mar 24, 2023
1 parent b18f7f8 commit 7abf61a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:

- uses: 'google-github-actions/auth@main'
with:
workload_identity_provider: '${{ secrets.WIF_PROVIDER_NAME }}'
service_account: '${{ secrets.SERVICE_ACCOUNT_EMAIL }}'
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'

- name: 'Create files'
run: |-
Expand All @@ -48,7 +48,7 @@ jobs:
uses: './'
with:
path: './test'
destination: '${{ secrets.BUCKET_NAME }}/testprefix'
destination: '${{ vars.BUCKET_NAME }}/testprefix'

- name: 'Get output'
run: 'echo "${{ steps.upload.outputs.uploaded }}"'
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
# Only authenticate if this is a full CI run.
- uses: 'google-github-actions/auth@main'
with:
workload_identity_provider: '${{ secrets.WIF_PROVIDER_NAME }}'
service_account: '${{ secrets.SERVICE_ACCOUNT_EMAIL }}'
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}

# The secrets will only be injected in pushes to main or from maintainers.
# If they aren't present, the associated steps are skipped.
- name: 'npm test'
run: 'npm run test'
env:
UPLOAD_CLOUD_STORAGE_TEST_BUCKET: '${{ secrets.BUCKET_NAME }}'
UPLOAD_CLOUD_STORAGE_TEST_PROJECT: '${{ secrets.PROJECT_ID }}'
UPLOAD_CLOUD_STORAGE_TEST_BUCKET: '${{ vars.BUCKET_NAME }}'
UPLOAD_CLOUD_STORAGE_TEST_PROJECT: '${{ vars.PROJECT_ID }}'

0 comments on commit 7abf61a

Please sign in to comment.