Skip to content

Commit

Permalink
- provide GITHUB_TOKEN to Staging (oops)
Browse files Browse the repository at this point in the history
- Don't fail totally if GITHUB_TOKEN is missing.
  • Loading branch information
Zemnmez authored and zemnm-me-actions-admin-user-zemnmez committed Oct 24, 2023
1 parent d7e3dc3 commit 1f6ab05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jobs:
GITHUB_OWNER: zemn-me/monorepo
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_SECRET }}
GITHUB_TOKEN: ${{ secrets.GH_PAT_SECRETS_CREATOR }}
BAZEL_REMOTE_CACHE_URL: ${{ secrets.BAZEL_REMOTE_CACHE_URL }}
Submit:
concurrency: pulumi_production
Expand Down
8 changes: 7 additions & 1 deletion ts/pulumi/bazel_rce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as awsx from '@pulumi/awsx';
import * as GitHub from '@pulumi/github';
import * as Pulumi from '@pulumi/pulumi';
import * as random from '@pulumi/random';
import { Command } from 'ts/github/actions';
import * as Cert from 'ts/pulumi/lib/certificate';

export interface Args {
Expand Down Expand Up @@ -371,7 +372,12 @@ export class BazelRemoteCache extends Pulumi.ComponentResource {
);

if (!process.env['GITHUB_TOKEN'])
throw new Error('missing GITHUB_TOKEN.');
console.log(
Command('error')({
file: 'ts/pulumi/bazel_rce/index.ts',
line: '375',
})('Missing GITHUB_TOKEN! Will not be able to update GitHub!')
);

new GitHub.ActionsSecret(
`${name}_actions_secret_cache_url`,
Expand Down

0 comments on commit 1f6ab05

Please sign in to comment.