-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.13 KB
/
deploy-gridle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: cd
on:
push:
branches:
- "main"
- "setup-cd"
jobs:
deploy-gridle:
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v4"
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1"
with:
token_format: "access_token"
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}"
# This example uses the docker login action
- uses: "docker/login-action@v1"
with:
registry: "us-central1-docker.pkg.dev" # or REGION-docker.pkg.dev
username: "oauth2accesstoken"
password: "${{ steps.auth.outputs.access_token }}"
# # This example runs "docker login" directly to Artifact Registry.
# - run: |-
# echo '${{ steps.auth.outputs.access_token }}' | docker login -u oauth2accesstoken --password-stdin https://us-central1-docker.pkg.dev
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: "{{defaultContext}}:gridle_game"
tags: us-central1-docker.pkg.dev/geography-games/gridle-repo/gridle:latest