Skip to content

Commit

Permalink
CHORE: fix deploy (updated to latest gcr gha)
Browse files Browse the repository at this point in the history
  • Loading branch information
fileformat committed Nov 28, 2023
1 parent a6fecb2 commit 567dfdc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
29 changes: 17 additions & 12 deletions .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:
Expand All @@ -13,32 +15,35 @@ 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
run: |
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: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,7 +1,7 @@

# SimpleShare [<img alt="SimpleShare Logo" src="https://www.vectorlogo.zone/logos/simplesharedev/simplesharedev-tile.svg" height="96" align="right" />](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.
Expand Down

0 comments on commit 567dfdc

Please sign in to comment.