Skip to content

Commit

Permalink
Init cd action
Browse files Browse the repository at this point in the history
  • Loading branch information
bendnorman committed Nov 10, 2023
1 parent 430c491 commit bcc9636
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-gridle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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:
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
tags: us-central1-docker.pkg.dev/geography-games/gridle-repo/gridle:latest

0 comments on commit bcc9636

Please sign in to comment.