Skip to content

Commit 56562dd

Browse files
authored
Use new markdown syntax for alerts (#371)
1 parent 5f7afaa commit 56562dd

3 files changed

Lines changed: 70 additions & 42 deletions

File tree

README.md

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ jobs:
6262
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
6363
```
6464

65-
> **⚠️ NOTE!** Changing the `permissions` block may remove some default
66-
> permissions. See the [permissions documentation][github-perms] for more
67-
> information.
65+
> [!NOTE]
66+
>
67+
> Changing the `permissions` block may remove some default permissions. See the
68+
> [permissions documentation][github-perms] for more information.
6869
6970
For more usage options, see the [examples](docs/EXAMPLES.md).
7071

@@ -73,9 +74,11 @@ For more usage options, see the [examples](docs/EXAMPLES.md).
7374

7475
### Inputs: Workload Identity Federation
7576

76-
> **⚠️ WARNING!** This option is [not supported by Firebase Admin
77-
> SDK](https://github.com/firebase/firebase-admin-node/issues/1377). Use
78-
> Service Account Key JSON authentication instead.
77+
> [!WARNING]
78+
>
79+
> This option is [not supported by Firebase Admin
80+
> SDK](https://github.com/firebase/firebase-admin-node/issues/1377). Use Service
81+
> Account Key JSON authentication instead.
7982
8083
The following inputs are for _authenticating_ to Google Cloud via Workload
8184
Identity Federation.
@@ -108,8 +111,10 @@ Identity Federation.
108111
109112
### Inputs: Service Account Key JSON
110113
111-
> **⚠️ WARNING!** Service Account Key JSON credentials are long-lived
112-
> credentials and must be treated like a password.
114+
> [!CAUTION]
115+
>
116+
> Service Account Key JSON credentials are long-lived credentials and must be
117+
> treated like a password.
113118
114119
The following inputs are for _authenticating_ to Google Cloud via a Service
115120
Account Key JSON.
@@ -319,10 +324,12 @@ This section describes the three configuration options:
319324
1. [Workload Identity Federation through a Service Account](#indirect-wif)
320325
1. [Service Account Key JSON](#sake)
321326
322-
> **⚠️ NOTE!** It can take up to 5 minutes for Workload Identity Pools, Workload
323-
> Identity Providers, and IAM permissions to propagate. Please wait at least
324-
> five minutes and follow all [Troubleshooting steps](docs/TROUBLESHOOTING.md)
325-
> before opening an issue.
327+
> [!IMPORTANT]
328+
>
329+
> It can take up to 5 minutes for Workload Identity Pools, Workload Identity
330+
> Providers, and IAM permissions to propagate. Please wait at least five minutes
331+
> and follow all [Troubleshooting steps](docs/TROUBLESHOOTING.md) before opening
332+
> an issue.
326333
327334
328335
<a name="direct-wif" id="direct-wif"></a>
@@ -337,8 +344,10 @@ information.
337344
338345
[![Authenticate to Google Cloud from GitHub Actions with Direct Workload Identity Federation](docs/google-github-actions-auth-direct-workload-identity-federation.svg)](docs/google-github-actions-auth-direct-workload-identity-federation.svg)
339346
340-
> **⚠️ NOTE!** To generate OAuth 2.0 access tokens or ID tokens, you _must_
341-
> provide a service account email, and the Workload Identity Pool must have
347+
> [!IMPORTANT]
348+
>
349+
> To generate OAuth 2.0 access tokens or ID tokens, you _must_ provide a service
350+
> account email, and the Workload Identity Pool must have
342351
> `roles/iam.workloadIdentityUser` permissions on the target Google Cloud
343352
> Service Account. Follow the steps for Workload Identity Federation through a
344353
> Service Account instead.
@@ -389,9 +398,10 @@ These instructions use the [gcloud][gcloud] command-line tool.
389398
the principal invoking the GitHub Action). These can be used to further
390399
restrict the authentication using `--attribute-condition` flags.
391400
392-
> **❗️ NOTE!** You must map any claims in the incoming token to attributes
393-
> before you can assert on those attributes in a CEL expression or IAM
394-
> policy!**
401+
> [!IMPORTANT]
402+
>
403+
> You must map any claims in the incoming token to attributes before you can
404+
> assert on those attributes in a CEL expression or IAM policy!
395405
396406
1. Extract the Workload Identity **Provider** resource name:
397407
@@ -413,10 +423,12 @@ These instructions use the [gcloud][gcloud] command-line tool.
413423
workload_identity_provider: '...' # "projects/123456789/locations/global/workloadIdentityPools/github/providers/my-repo"
414424
```
415425
416-
> **⚠️ NOTE!** The `project_id` input is optional, but may be required by
417-
> downstream authentication systems such as the `gcloud` CLI. Unfortunately
418-
> we cannot extract the project ID from the Workload Identity Provider,
419-
> since it requires the project _number_.
426+
> [!IMPORTANT]
427+
>
428+
> The `project_id` input is optional, but may be required by downstream
429+
> authentication systems such as the `gcloud` CLI. Unfortunately we cannot
430+
> extract the project ID from the Workload Identity Provider, since it
431+
> requires the project _number_.
420432
>
421433
> It is technically possible to convert a project _number_ into a project
422434
> _ID_, but it requires permissions to call Cloud Resource Manager, and we
@@ -512,9 +524,10 @@ These instructions use the [gcloud][gcloud] command-line tool.
512524
the principal invoking the GitHub Action). These can be used to further
513525
restrict the authentication using `--attribute-condition` flags.
514526
515-
> **❗️ NOTE!** You must map any claims in the incoming token to attributes
516-
> before you can assert on those attributes in a CEL expression or IAM
517-
> policy!**
527+
> [!IMPORTANT]
528+
>
529+
> You must map any claims in the incoming token to attributes before you can
530+
> assert on those attributes in a CEL expression or IAM policy!**
518531
519532
1. Allow authentications from the Workload Identity Pool to your Google Cloud
520533
Service Account.
@@ -576,7 +589,9 @@ as a secret.
576589
577590
[![Authenticate to Google Cloud from GitHub Actions with a Service Account Key](docs/google-github-actions-auth-service-account-key-export.svg)](docs/google-github-actions-auth-service-account-key-export.svg)
578591
579-
> **❗️ WARNING!** Google Cloud Service Account Key JSON files must be secured
592+
> [!CAUTION]
593+
>
594+
> Google Cloud Service Account Key JSON files must be secured
580595
> and treated like a password. Anyone with acess to the JSON key can
581596
> authenticate to Google Cloud as the underlying Service Account. By default,
582597
> these credentials never expire, which is why the former authentication options

docs/EXAMPLES.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,16 @@ jobs:
114114
This example demonstrates using this GitHub Action to generate an OAuth 2.0
115115
Access Token for authenticating to Google Cloud.
116116

117-
> **⚠️ NOTE!** The default lifetime is 1 hour, but you can request up to 12
118-
> hours if you set the
119-
> [`constraints/iam.allowServiceAccountCredentialLifetimeExtension` organization
120-
> policy][orgpolicy-creds-lifetime].
117+
> [!NOTE]
118+
>
119+
> The default lifetime is 1 hour, but you can request up to 12 hours if you set
120+
> the [`constraints/iam.allowServiceAccountCredentialLifetimeExtension`
121+
> organization policy][orgpolicy-creds-lifetime].
121122

122-
> **⚠️ NOTE!** If you authenticate via `credentials_json`, the service account
123-
> must have `roles/iam.serviceAccountTokenCreator` on itself.
123+
> [!IMPORTANT]
124+
>
125+
> If you authenticate via `credentials_json`, the service account must have
126+
> `roles/iam.serviceAccountTokenCreator` on itself.
124127

125128
```yaml
126129
jobs:
@@ -154,8 +157,10 @@ This example demonstrates using this GitHub Action to generate a Google Cloud ID
154157
Token for authenticating to Google Cloud. This is commonly used when invoking a
155158
Cloud Run service.
156159

157-
> **⚠️ NOTE!** If you authenticate via `credentials_json`, the service account
158-
> must have `roles/iam.serviceAccountTokenCreator` on itself.
160+
> [!IMPORTANT]
161+
>
162+
> If you authenticate via `credentials_json`, the service account must have
163+
> `roles/iam.serviceAccountTokenCreator` on itself.
159164

160165
```yaml
161166
jobs:

docs/TROUBLESHOOTING.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
see exactly which step is failing. Ensure you are using the latest version
77
of the GitHub Action.
88

9-
> **❗️ WARNING!** Enabling debug logging increases the chances of a secret
9+
> [!CAUTION]
10+
>
11+
> Enabling debug logging increases the chances of a secret
1012
> being accidentially logged. While GitHub Actions will scrub secrets,
1113
> please take extra caution when sharing these debug logs in publicly
1214
> accessible places like GitHub issues.
@@ -62,9 +64,11 @@
6264
GitHub OIDC token. You cannot grant permissions on an attribute unless you
6365
map that value from the incoming GitHub OIDC token.
6466

65-
> **📝 TIP!** Use the [GitHub Actions OIDC Debugger][oidc-debugger] to print
66-
> the list of token claims and compare them to your Attribute Mappings and
67-
> Attribute Conditions.
67+
> [!TIP]
68+
>
69+
> Use the [GitHub Actions OIDC Debugger][oidc-debugger] to print the list of
70+
> token claims and compare them to your Attribute Mappings and Attribute
71+
> Conditions.
6872

6973
1. Ensure you have the correct character casing and capitalization. GitHub does
7074
not distinguish between "foobar" and "FooBar", but Google Cloud does. Ensure
@@ -85,8 +89,10 @@
8589
1. Enable `Admin Read`, `Data Read`, and `Data Write` [Audit Logging][cal] for
8690
Identity and Access Management (IAM) in your Google Cloud project.
8791

88-
> **❗️ WARNING!** This will increase log volume which may increase costs.
89-
> You can disable this audit logging after you have debugged the issue.
92+
> [!WARNING]
93+
>
94+
> This will increase log volume which may increase costs. You can disable
95+
> this audit logging after you have debugged the issue.
9096

9197
Try to authenticate again, and then explore the logs for your Workload
9298
Identity Provider and Workload Identity Pool. Sometimes these error messages
@@ -98,8 +104,8 @@
98104
processing ADC correctly and using the latest versions of the Google client
99105
libraries.
100106

101-
> **⚠️ NOTE!** We do not have control over GitHub Actions outside of the
102-
> `google-github-actions` GitHub organization.
107+
**We do not have control over GitHub Actions outside of the
108+
`google-github-actions` GitHub organization.**
103109

104110

105111
## Subject exceeds the 127 byte limit
@@ -232,7 +238,9 @@ cat credentials.json | jq -r tostring
232238

233239
## Organizational Policy Constraints
234240

235-
> **⚠️ NOTE!** Your Google Cloud organization administrator controls these
241+
> [!NOTE]
242+
>
243+
> Your Google Cloud organization administrator controls these
236244
> policies. You must work with your internal IT department to resolve OrgPolicy
237245
> violations and constraints.
238246

0 commit comments

Comments
 (0)