From 567dfdc688429fadf2149b25e4d7389e0230da17 Mon Sep 17 00:00:00 2001 From: Andrew Marcuse Date: Mon, 27 Nov 2023 23:12:12 -0500 Subject: [PATCH] CHORE: fix deploy (updated to latest gcr gha) --- .github/workflows/gcr-deploy.yaml | 29 +++++++++++++++++------------ README.md | 4 ++-- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/gcr-deploy.yaml b/.github/workflows/gcr-deploy.yaml index 0a1d5e9..d12fd68 100644 --- a/.github/workflows/gcr-deploy.yaml +++ b/.github/workflows/gcr-deploy.yaml @@ -1,10 +1,12 @@ -name: build +name: deploy on: push: branches: - main + workflow_dispatch: + # Environment variables available to all jobs and steps in this workflow # NOTE: these aren't really secret, but there aren't non-secret settings env: @@ -13,24 +15,26 @@ env: RUN_SERVICE: ${{ secrets.RUN_SERVICE }} jobs: - setup-build-deploy: - name: Setup, Build, and Deploy + deploy: + name: Deploy to CloudRun runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v1 - # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@master + - name: gcloud auth + id: 'auth' + uses: 'google-github-actions/auth@v0' with: - project_id: ${{ env.RUN_PROJECT }} - service_account_key: ${{ secrets.GCP_SA_KEY }} + credentials_json: '${{ secrets.GCP_SA_KEY }}' - # Configure gcloud CLI - - name: gcloud Set up - run: | - gcloud config set project ${RUN_PROJECT} + # Setup gcloud CLI + - name: gcloud setup + uses: google-github-actions/setup-gcloud@v0 + + - name: gcloud docker-auth + run: gcloud auth configure-docker # Build and push image to Google Container Registry - name: Build @@ -38,7 +42,8 @@ jobs: docker build \ --build-arg COMMIT=${GITHUB_SHA:0:7} \ --build-arg LASTMOD=$(date -u +%Y-%m-%dT%H:%M:%SZ) \ - --tag gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA . + --tag gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA \ + . - name: GCloud auth to docker run: | diff --git a/README.md b/README.md index 99cf1d9..e48fb61 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # SimpleShare [SimpleShare Logo](https://simpleshare.dev/) -[![# of images](https://img.shields.io/badge/dynamic/json.svg?style=flat-square&label=Social+sites&url=https%3A%2F%2Fsimpleshare.dev%2Fstatus.json&query=%24.targetcount)](https://simpleshare.dev/) -[![Github Action build status](https://github.com/VectorLogoZone/logosearch/workflows/build/badge.svg)](https://github.com/fileformat/simpleshare/actions) +[![# of sites](https://img.shields.io/badge/dynamic/json.svg?style=flat-square&label=Social+sites&url=https%3A%2F%2Fsimpleshare.dev%2Fstatus.json&query=%24.targetcount)](https://simpleshare.dev/) +[![deploy](https://github.com/fileformat/simpleshare/actions/workflows/gcr-deploy.yaml/badge.svg)](https://github.com/fileformat/simpleshare/actions/workflows/gcr-deploy.yaml) [![AGPLv3](https://img.shields.io/github/license/fileformat/simpleshare.svg?style=flat-square)](LICENSE.txt) [SimpleShare](https://simpleshare.dev/) is a simple site to redirect to one of the social sharing sites. It is really just so I don't have to use a third-party service that bloats my pages with a ton of Javascript and tracks my viewers.