Skip to content

Bump globals from 15.9.0 to 15.10.0 in /client (#2697) #308

Bump globals from 15.9.0 to 15.10.0 in /client (#2697)

Bump globals from 15.9.0 to 15.10.0 in /client (#2697) #308

Workflow file for this run

name: CD Workflow
on:
push:
tags:
- '*'
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
id-token: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Unpackage fonts
run: |
gpg --quiet --batch --yes --decrypt --passphrase=${{ secrets.FONTS_PASSPHRASE }} --output client/fonts.tar.gz client/fonts.tar.gz.gpg
cd client/fonts
tar xf ../fonts.tar.gz
- name: Log into Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v5
env:
TAG: ${{ github.ref_name }}
with:
files: docker-bake.hcl
push: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
deploy:
name: Deploy
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Set up kubectl
uses: azure/setup-kubectl@v4
- name: Set up ID token
uses: actions/github-script@v7
id: id-token
with:
result-encoding: string
script: |
return await core.getIDToken('k8s.chitoku.jp');
- name: Set context
run: |
kubectl config set-cluster k8s.chitoku.jp --server=https://k8s.chitoku.jp
kubectl config set-credentials github-actions --token=${{ steps.id-token.outputs.result }}
kubectl config set-context k8s.chitoku.jp --cluster=k8s.chitoku.jp --user=github-actions
kubectl config use-context k8s.chitoku.jp
- name: Update images
run: |
kubectl set image deployment/homochecker-app \
api=ghcr.io/chitoku-k/homochecker/api:${{ github.ref_name }} \
web=ghcr.io/chitoku-k/homochecker/web:${{ github.ref_name }}