Skip to content

chore(deps): update golang docker tag to v1.23.5 (#221) #162

chore(deps): update golang docker tag to v1.23.5 (#221)

chore(deps): update golang docker tag to v1.23.5 (#221) #162

Workflow file for this run

name: Build App for Production
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
id-token: write
pages: write
packages: write
env:
NODE_VERSION: 20.9.0
jobs:
filter:
runs-on: ubuntu-latest
outputs:
frontend: ${{ steps.filter.outputs.frontend }}
spec: ${{ steps.filter.outputs.spec }}
example: ${{ steps.filter.outputs.example }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
frontend:
- "frontend/**"
- ".github/workflows/prd-deploy.yaml"
spec:
- "spec/**"
- ".github/workflows/prd-deploy.yaml"
example:
- "example/**"
- ".github/workflows/prd-deploy.yaml"
prd-build-backend:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-backend:1.0.${{ github.run_number }}
path: "."
cache-registry: ghcr.io/${{ github.repository }}-backend:buildcache
prd-build-frontend:
runs-on: ubuntu-latest
environment: production
needs: filter
if: needs.filter.outputs.frontend == 'true'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-frontend:1.0.${{ github.run_number }}
path: "./frontend"
build-args: |
NEXT_PUBLIC_API_URL=https://auth.piny940.com/api/v1
cache-registry: ghcr.io/${{ github.repository }}-frontend:buildcache
prd-build-example:
runs-on: ubuntu-latest
environment: production
needs: filter
if: needs.filter.outputs.example == 'true'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-build
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
github-actor: ${{ github.actor }}
tags: ghcr.io/${{ github.repository }}-example:1.0.${{ github.run_number }}
path: "./example"
build-args: |
NEXT_PUBLIC_API_URL=https://auth.piny940.com/api/v1
cache-registry: ghcr.io/${{ github.repository }}-example:buildcache
build-doc:
runs-on: ubuntu-latest
needs: filter
if: needs.filter.outputs.spec == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: "spec/package.json"
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: "spec/package.json"
- name: Build doc
run: cd spec && pnpm run export
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: |
pages deploy --project-name=auth-doc spec/out