Skip to content

docs: README

docs: README #27

Workflow file for this run

name: Deploy
on:
push:
tags:
- 'v[0-9].[0-9]+.[0-9]+'
env:
IMAGE: 'rosethorn999/gympool_frontend_nextjs'
TAG: 'latest'
CONTAINER_NAME: 'next3000'
NEXT_PUBLIC_API_HOST: 'https://gympool-stg-fastapi.nodm.app/'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.IMAGE }}:${{ env.TAG }}
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v3'
- uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- id: 'deploy'
uses: 'google-github-actions/deploy-cloudrun@v1'
with:
service: ${{ env.CONTAINER_NAME }}
image: ${{ env.IMAGE }}:${{ env.TAG }}
env_vars: |
NEXT_PUBLIC_API_HOST=${{ env.NEXT_PUBLIC_API_HOST }}
- name: 'Use output'
run: 'curl "${{ steps.deploy.outputs.url }}"'