Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
e181ea4
Add workflow for Node.js package testing and publishing
Tanker187 Dec 12, 2025
6e013a2
Add GitHub Actions workflow for NodeJS with Webpack
Tanker187 Dec 12, 2025
b0915ae
Add Deno CI workflow for linting and testing
Tanker187 Dec 12, 2025
4a195d6
Add devcontainer configuration file
Tanker187 Dec 12, 2025
2bb49c1
Create SECURITY.md
Tanker187 Feb 11, 2026
5efeedf
Merge pull request #1 from Tanker187/Tanker187-patch-1
Tanker187 Feb 11, 2026
9d4809c
Create codeql.yml
Tanker187 Feb 11, 2026
cbbe032
Create nextjs.yml
Tanker187 Feb 11, 2026
72bcc24
Merge pull request #2 from Tanker187/Tanker187-patch-2
Tanker187 Feb 11, 2026
8b60736
Potential fix for code scanning alert no. 6: Missing rate limiting
Tanker187 Feb 11, 2026
80e7595
Potential fix for code scanning alert no. 1: Workflow does not contai…
Tanker187 Feb 11, 2026
80954f9
Potential fix for code scanning alert no. 12: Shell command built fro…
Tanker187 Feb 11, 2026
df178d1
Potential fix for code scanning alert no. 52: Inefficient regular exp…
Tanker187 Feb 11, 2026
fd4ebf1
Create npm-publish-github-packages.yml
Tanker187 Feb 11, 2026
b2b5cb5
Create google-cloudrun-source.yml
Tanker187 Feb 11, 2026
93a3ed2
Create google-cloudrun-docker.yml
Tanker187 Feb 11, 2026
6d248be
Create node.js.yml
Tanker187 Feb 11, 2026
cadc640
Create datadog-synthetics.yml
Tanker187 Feb 11, 2026
e22ba19
Create google.yml
Tanker187 Feb 11, 2026
f3adbb1
Merge branch 'vitejs:main' into main
Tanker187 Feb 11, 2026
fab406e
Potential fix for code scanning alert no. 32: Bad HTML filtering regexp
Tanker187 Feb 11, 2026
776b058
Potential fix for code scanning alert no. 28: Uncontrolled data used …
Tanker187 Feb 11, 2026
4ec3a59
Potential fix for code scanning alert no. 30: Uncontrolled data used …
Tanker187 Feb 11, 2026
9878ce5
Potential fix for code scanning alert no. 5: Missing rate limiting
Tanker187 Feb 11, 2026
bc6df41
Potential fix for code scanning alert no. 51: Inefficient regular exp…
Tanker187 Feb 11, 2026
7e36743
Potential fix for code scanning alert no. 34: Incomplete string escap…
Tanker187 Feb 11, 2026
50f680d
Potential fix for code scanning alert no. 16: Reflected cross-site sc…
Tanker187 Feb 11, 2026
2d86dc7
Potential fix for code scanning alert no. 4: Incorrect suffix check
Tanker187 Feb 11, 2026
32766b0
Create node.js
Tanker187 Feb 11, 2026
a9781b2
Create index.ts
Tanker187 Feb 11, 2026
07dc2ed
Create global-provider.ts
Tanker187 Feb 11, 2026
3d241f4
Create provider-level.ts
Tanker187 Feb 11, 2026
a138cda
Create ai-sdk.ts
Tanker187 Feb 11, 2026
48a35b6
Merge pull request #3 from Tanker187/alert-autofix-6
Tanker187 Feb 11, 2026
887e1b8
Merge pull request #4 from Tanker187/alert-autofix-1
Tanker187 Feb 11, 2026
8990887
Merge pull request #5 from Tanker187/alert-autofix-12
Tanker187 Feb 11, 2026
601cbda
Potential fix for code scanning alert no. 53: Inefficient regular exp…
Tanker187 Feb 11, 2026
0741f6d
Merge pull request #7 from Tanker187/alert-autofix-52
Tanker187 Feb 11, 2026
47444ca
Merge pull request #8 from Tanker187/Tanker187-patch-2
Tanker187 Feb 11, 2026
869b2df
Merge pull request #9 from Tanker187/Tanker187-patch-3
Tanker187 Feb 11, 2026
04ac4e1
Merge pull request #10 from Tanker187/Tanker187-patch-4
Tanker187 Feb 11, 2026
fb3042b
Merge pull request #11 from Tanker187/Tanker187-patch-5
Tanker187 Feb 11, 2026
7852343
Merge pull request #12 from Tanker187/Tanker187-patch-6
Tanker187 Feb 11, 2026
785bd51
Merge pull request #13 from Tanker187/Tanker187-patch-7
Tanker187 Feb 11, 2026
dc262ef
Merge pull request #14 from Tanker187/alert-autofix-32
Tanker187 Feb 11, 2026
5b373a3
Merge pull request #15 from Tanker187/alert-autofix-28
Tanker187 Feb 11, 2026
e2266a1
Merge pull request #16 from Tanker187/alert-autofix-30
Tanker187 Feb 11, 2026
26dbb74
Merge pull request #27 from Tanker187/Tanker187-patch-13
Tanker187 Feb 11, 2026
f6544f0
Merge pull request #23 from Tanker187/Tanker187-patch-97
Tanker187 Feb 11, 2026
6c6e39e
Merge pull request #25 from Tanker187/Tanker187-patch-11
Tanker187 Feb 11, 2026
85bbb7e
Merge pull request #26 from Tanker187/Tanker187-patch-12
Tanker187 Feb 11, 2026
cacf2c6
Merge pull request #24 from Tanker187/Tanker187-patch-10
Tanker187 Feb 11, 2026
f59c019
Merge pull request #19 from Tanker187/alert-autofix-34
Tanker187 Feb 11, 2026
09f36dd
Merge pull request #21 from Tanker187/alert-autofix-4
Tanker187 Feb 11, 2026
22a647e
Merge pull request #18 from Tanker187/alert-autofix-51
Tanker187 Feb 11, 2026
9a3d2b6
Merge pull request #17 from Tanker187/alert-autofix-5
Tanker187 Feb 11, 2026
49af131
Merge pull request #20 from Tanker187/alert-autofix-16
Tanker187 Feb 11, 2026
85acc96
Potential fix for code scanning alert no. 31: Uncontrolled data used …
Tanker187 Feb 11, 2026
f62b268
Potential fix for code scanning alert no. 7: Missing rate limiting
Tanker187 Feb 11, 2026
e83ef2d
Potential fix for code scanning alert no. 8: Missing rate limiting
Tanker187 Feb 11, 2026
f3561f1
Potential fix for code scanning alert no. 49: Information exposure th…
Tanker187 Feb 11, 2026
36724ab
Potential fix for code scanning alert no. 57: Workflow does not conta…
Tanker187 Feb 11, 2026
d5cea3a
Potential fix for code scanning alert no. 3: Workflow does not contai…
Tanker187 Feb 11, 2026
aca9de7
Potential fix for code scanning alert no. 56: Workflow does not conta…
Tanker187 Feb 11, 2026
b3a4d0b
Potential fix for code scanning alert no. 58: Workflow does not conta…
Tanker187 Feb 11, 2026
889add1
Potential fix for code scanning alert no. 14: Shell command built fro…
Tanker187 Feb 11, 2026
17c049f
Potential fix for code scanning alert no. 17: Exception text reinterp…
Tanker187 Feb 11, 2026
5cbc909
Potential fix for code scanning alert no. 18: Exception text reinterp…
Tanker187 Feb 11, 2026
25746e2
Potential fix for code scanning alert no. 19: Exception text reinterp…
Tanker187 Feb 11, 2026
28f00ef
Potential fix for code scanning alert no. 20: Exception text reinterp…
Tanker187 Feb 11, 2026
8c05ca9
Potential fix for code scanning alert no. 21: Exception text reinterp…
Tanker187 Feb 11, 2026
e42d526
Potential fix for code scanning alert no. 22: Exception text reinterp…
Tanker187 Feb 11, 2026
4acfb76
Potential fix for code scanning alert no. 36: Prototype-polluting fun…
Tanker187 Feb 11, 2026
a907890
Potential fix for code scanning alert no. 38: Improper code sanitization
Tanker187 Feb 11, 2026
93a6489
Potential fix for code scanning alert no. 39: Improper code sanitization
Tanker187 Feb 11, 2026
6c5cbf3
Potential fix for code scanning alert no. 61: Bad HTML filtering regexp
Tanker187 Feb 11, 2026
f29ea1a
Potential fix for code scanning alert no. 44: Information exposure th…
Tanker187 Feb 11, 2026
e442c05
Potential fix for code scanning alert no. 9: Missing rate limiting
Tanker187 Feb 11, 2026
e04177a
Potential fix for code scanning alert no. 11: Missing rate limiting
Tanker187 Feb 11, 2026
4fe9d1b
Potential fix for code scanning alert no. 24: Uncontrolled data used …
Tanker187 Feb 11, 2026
1ba9949
Potential fix for code scanning alert no. 27: Uncontrolled data used …
Tanker187 Feb 11, 2026
f134676
Potential fix for code scanning alert no. 29: Uncontrolled data used …
Tanker187 Feb 11, 2026
8f7e03b
Potential fix for code scanning alert no. 33: Incomplete string escap…
Tanker187 Feb 11, 2026
994c752
Potential fix for code scanning alert no. 62: Inefficient regular exp…
Tanker187 Feb 11, 2026
55e378b
Potential fix for code scanning alert no. 10: Missing rate limiting
Tanker187 Feb 11, 2026
627532a
Potential fix for code scanning alert no. 60: Information exposure th…
Tanker187 Feb 11, 2026
9f225b8
Merge pull request #28 from Tanker187/alert-autofix-31
Tanker187 Feb 11, 2026
c92fda6
Merge pull request #29 from Tanker187/alert-autofix-7
Tanker187 Feb 11, 2026
b51a078
Merge pull request #30 from Tanker187/alert-autofix-8
Tanker187 Feb 11, 2026
6b61fe9
Merge pull request #31 from Tanker187/alert-autofix-49
Tanker187 Feb 11, 2026
33f1c9b
Merge pull request #32 from Tanker187/alert-autofix-57
Tanker187 Feb 11, 2026
0c845be
Merge pull request #33 from Tanker187/alert-autofix-3
Tanker187 Feb 11, 2026
7b3bd05
Merge pull request #34 from Tanker187/alert-autofix-56
Tanker187 Feb 11, 2026
559635c
Merge pull request #35 from Tanker187/alert-autofix-58
Tanker187 Feb 11, 2026
b10cad5
Merge pull request #36 from Tanker187/alert-autofix-14
Tanker187 Feb 11, 2026
32bec4e
Merge pull request #38 from Tanker187/alert-autofix-17
Tanker187 Feb 11, 2026
d22869e
Merge pull request #39 from Tanker187/alert-autofix-18
Tanker187 Feb 11, 2026
d5486ad
Merge pull request #40 from Tanker187/alert-autofix-19
Tanker187 Feb 11, 2026
f974158
Merge pull request #41 from Tanker187/alert-autofix-20
Tanker187 Feb 11, 2026
059d23e
Merge pull request #42 from Tanker187/alert-autofix-21
Tanker187 Feb 11, 2026
4cd8792
Merge pull request #43 from Tanker187/alert-autofix-22
Tanker187 Feb 11, 2026
aac8031
Merge pull request #45 from Tanker187/alert-autofix-36
Tanker187 Feb 11, 2026
8d4e55e
Merge pull request #47 from Tanker187/alert-autofix-38
Tanker187 Feb 11, 2026
22d4195
Merge pull request #66 from Tanker187/alert-autofix-60
Tanker187 Feb 11, 2026
930332e
Merge pull request #61 from Tanker187/alert-autofix-62
Tanker187 Feb 11, 2026
974d931
Merge pull request #59 from Tanker187/alert-autofix-29
Tanker187 Feb 11, 2026
feab054
Merge pull request #58 from Tanker187/alert-autofix-27
Tanker187 Feb 11, 2026
77e4ed1
Merge pull request #54 from Tanker187/alert-autofix-11
Tanker187 Feb 11, 2026
47eec15
Merge pull request #60 from Tanker187/alert-autofix-33
Tanker187 Feb 11, 2026
1bfdaf1
Merge pull request #55 from Tanker187/alert-autofix-24
Tanker187 Feb 11, 2026
c0f2f80
Merge pull request #48 from Tanker187/alert-autofix-39
Tanker187 Feb 11, 2026
756344f
Merge pull request #51 from Tanker187/alert-autofix-44
Tanker187 Feb 11, 2026
d9db0f5
Merge pull request #50 from Tanker187/alert-autofix-61
Tanker187 Feb 11, 2026
b31714e
Merge pull request #53 from Tanker187/alert-autofix-9
Tanker187 Feb 11, 2026
0cef99d
Potential fix for code scanning alert no. 65: Inefficient regular exp…
Tanker187 Feb 11, 2026
ae7e9f7
Merge pull request #68 from Tanker187/alert-autofix-65
Tanker187 Feb 11, 2026
52121e1
Potential fix for code scanning alert no. 64: Uncontrolled data used …
Tanker187 Feb 11, 2026
9a646bb
Merge pull request #69 from Tanker187/alert-autofix-64
Tanker187 Feb 11, 2026
4b2c44a
Potential fix for code scanning alert no. 43: Information exposure th…
Tanker187 Feb 11, 2026
a177d65
Merge pull request #70 from Tanker187/alert-autofix-43
Tanker187 Feb 11, 2026
773e1da
Merge pull request #63 from Tanker187/alert-autofix-10
Tanker187 Feb 11, 2026
6606dbc
Merge branch 'vitejs:main' into main
Tanker187 Feb 20, 2026
a3176d1
Merge branch 'vitejs:main' into main
Tanker187 Feb 28, 2026
aff57fd
Merge branch 'vitejs:main' into main
Tanker187 Mar 2, 2026
48db7df
Merge branch 'vitejs:main' into main
Tanker187 Mar 5, 2026
d7c5112
Merge branch 'vitejs:main' into main
Tanker187 Mar 5, 2026
20293ea
Merge branch 'vitejs:main' into main
Tanker187 Mar 7, 2026
b3d450b
Merge branch 'vitejs:main' into main
Tanker187 Mar 9, 2026
c2d5f44
Merge branch 'vitejs:main' into main
Tanker187 Mar 9, 2026
fd570c9
Merge branch 'vitejs:main' into main
Tanker187 Mar 9, 2026
fdf66e0
Merge branch 'vitejs:main' into main
Tanker187 Mar 12, 2026
e0bbc3b
Merge branch 'vitejs:main' into main
Tanker187 Mar 14, 2026
7ac7f7a
Merge branch 'vitejs:main' into main
Tanker187 Mar 15, 2026
55a2c84
Merge branch 'vitejs:main' into main
Tanker187 Mar 15, 2026
d5007b5
Delete pnpm-lock.yaml
Tanker187 Mar 17, 2026
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
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {}
}
14 changes: 14 additions & 0 deletions .github/workflows/ai-sdk.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { streamText } from 'ai';

const result = streamText({
headers: {
'http-referer': 'https://myapp.vercel.app',
'x-title': 'MyApp',
},
model: 'anthropic/claude-sonnet-4.5',
prompt: 'Hello, world!',
});

for await (const part of result.textStream) {
process.stdout.write(part);
}
101 changes: 101 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '43 22 * * 6'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
41 changes: 41 additions & 0 deletions .github/workflows/datadog-synthetics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will trigger Datadog Synthetic tests within your Datadog organisation
# For more information on running Synthetic tests within your GitHub workflows see: https://docs.datadoghq.com/synthetics/cicd_integrations/github_actions/

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# To get started:

# 1. Add your Datadog API (DD_API_KEY) and Application Key (DD_APP_KEY) as secrets to your GitHub repository. For more information, see: https://docs.datadoghq.com/account_management/api-app-keys/.
# 2. Start using the action within your workflow

name: Run Datadog Synthetic tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Run Synthetic tests within your GitHub workflow.
# For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci
- name: Run Datadog Synthetic tests
uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0
with:
api_key: ${{secrets.DD_API_KEY}}
app_key: ${{secrets.DD_APP_KEY}}
test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy


42 changes: 42 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
with:
deno-version: v1.x

# Uncomment this step to verify the use of 'deno fmt' on each commit.
# - name: Verify formatting
# run: deno fmt --check

- name: Run linter
run: deno lint

- name: Run tests
run: deno test -A
22 changes: 22 additions & 0 deletions .github/workflows/global-provider.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { streamText } from 'ai';
import { createGateway } from '@ai-sdk/gateway';

const gateway = createGateway({
headers: {
'http-referer': 'https://myapp.vercel.app',
'x-title': 'MyApp',
},
});

// Set your provider as the default to allow plain-string model id creation with this instance
globalThis.AI_SDK_DEFAULT_PROVIDER = gateway;

// Now you can use plain string model IDs and they'll use your custom provider
const result = streamText({
model: 'anthropic/claude-sonnet-4.5', // Uses the gateway provider with headers
prompt: 'Hello, world!',
});

for await (const part of result.textStream) {
process.stdout.write(part);
}
95 changes: 95 additions & 0 deletions .github/workflows/google-cloudrun-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# This workflow build and push a Docker container to Google Artifact Registry
# and deploy it on Cloud Run when a commit is pushed to the "main"
# branch.
#
# To configure this workflow:
#
# 1. Enable the following Google Cloud APIs:
#
# - Artifact Registry (artifactregistry.googleapis.com)
# - Cloud Run (run.googleapis.com)
# - IAM Credentials API (iamcredentials.googleapis.com)
#
# You can learn more about enabling APIs at
# https://support.google.com/googleapi/answer/6158841.
#
# 2. Create and configure a Workload Identity Provider for GitHub:
# https://github.com/google-github-actions/auth#preferred-direct-workload-identity-federation.
#
# Depending on how you authenticate, you will need to grant an IAM principal
# permissions on Google Cloud:
#
# - Artifact Registry Administrator (roles/artifactregistry.admin)
# - Cloud Run Developer (roles/run.developer)
#
# You can learn more about setting IAM permissions at
# https://cloud.google.com/iam/docs/manage-access-other-resources
#
# 3. Change the values in the "env" block to match your values.

name: 'Build and Deploy to Cloud Run'

on:
push:
branches:
- '"main"'

env:
PROJECT_ID: 'my-project' # TODO: update to your Google Cloud project ID
REGION: 'us-central1' # TODO: update to your region
SERVICE: 'my-service' # TODO: update to your service name
WORKLOAD_IDENTITY_PROVIDER: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' # TODO: update to your workload identity provider

jobs:
deploy:
runs-on: 'ubuntu-latest'

permissions:
contents: 'read'
id-token: 'write'

steps:
- name: 'Checkout'
uses: 'actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332' # actions/checkout@v4

# Configure Workload Identity Federation and generate an access token.
#
# See https://github.com/google-github-actions/auth for more options,
# including authenticating via a JSON credentials file.
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2' # google-github-actions/auth@v2
with:
workload_identity_provider: '${{ env.WORKLOAD_IDENTITY_PROVIDER }}'

# BEGIN - Docker auth and build
#
# If you already have a container image, you can omit these steps.
- name: 'Docker Auth'
uses: 'docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567' # docker/login-action@v3
with:
username: 'oauth2accesstoken'
password: '${{ steps.auth.outputs.auth_token }}'
registry: '${{ env.REGION }}-docker.pkg.dev'

- name: 'Build and Push Container'
run: |-
DOCKER_TAG="$${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}"
docker build --tag "${DOCKER_TAG}" .
docker push "${DOCKER_TAG}"
- name: 'Deploy to Cloud Run'

# END - Docker auth and build

uses: 'google-github-actions/deploy-cloudrun@33553064113a37d688aa6937bacbdc481580be17' # google-github-actions/deploy-cloudrun@v2
with:
service: '${{ env.SERVICE }}'
region: '${{ env.REGION }}'
# NOTE: If using a pre-built image, update the image name below:

image: '${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}'
# If required, use the Cloud Run URL output in later steps
- name: 'Show output'
run: |2-

echo ${{ steps.deploy.outputs.url }}
Loading
Loading