Skip to content

Commit 355aad7

Browse files
committed
GitHub Action
1 parent 6075547 commit 355aad7

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow deploys the repository to run daily on google cloud run
2+
3+
name: Deploy
4+
5+
on:
6+
push:
7+
# branches: develop
8+
9+
jobs:
10+
main:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Google Cloud Auth
17+
uses: google-github-actions/auth@v2
18+
with:
19+
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
20+
21+
- name: Set up Google Cloud
22+
uses: google-github-actions/setup-gcloud@v2
23+
24+
- name: Build Docker image
25+
run: gcloud builds submit --tag us-south1-docker.pkg.dev/api-tools-451421/runners/daily-update-events .
26+
27+
- name: Upload to dev job
28+
run: gcloud run jobs deploy daily-update-events-dev --image us-south1-docker.pkg.dev/api-tools-451421/runners/daily-update-events --tasks 1 --max-retries 5 --region us-south1 --project=api-tools-451421
29+
30+
- name: Upload to prod job
31+
run: gcloud run jobs deploy daily-update-events-prod --image us-south1-docker.pkg.dev/api-tools-451421/runners/daily-update-events --tasks 1 --max-retries 5 --region us-south1 --project=api-tools-451421

.github/workflows/go.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Go
55

66
on:
77
push:
8-
branches: [ "develop" ]
8+
branches: develop
99
pull_request:
10-
branches: [ "develop" ]
10+
branches: develop
1111
workflow_dispatch:
1212

1313
jobs:
@@ -17,10 +17,10 @@ jobs:
1717
steps:
1818

1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Set up Go
23-
uses: actions/setup-go@v4
23+
uses: actions/setup-go@v5
2424
with:
2525
go-version: '1.23'
2626

0 commit comments

Comments
 (0)