Skip to content

Commit 67af6ad

Browse files
committed
temp: fetch logs
1 parent 5b53dfe commit 67af6ad

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/gcp-logs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: GCP Logs
2+
on: [push]
3+
4+
jobs:
5+
logs:
6+
runs-on: ubuntu-latest
7+
environment: GCP-Rozen
8+
permissions:
9+
contents: 'read'
10+
id-token: 'write'
11+
12+
steps:
13+
- name: Authenticate Cloud CLI
14+
uses: 'google-github-actions/auth@v2'
15+
with:
16+
credentials_json: ${{ secrets.GCP_SA_KEY }}
17+
18+
- name: Set up Cloud SDK
19+
uses: 'google-github-actions/setup-gcloud@v2'
20+
21+
- name: Fetch Logs
22+
run: |
23+
gcloud logging read 'resource.type="cloud_run_revision" AND resource.labels.service_name="dcubabot"' --project=dcubabot --limit=50 --format=json > logs.json
24+
cat logs.json

0 commit comments

Comments
 (0)