Skip to content

Build Image

Build Image #70

Workflow file for this run

name: Build Image
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
bench:
runs-on: codebuild-problem-github-actions-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: "frontend/pnpm-lock.yaml"
- name: Build frontend
working-directory: ./bench
run: |
task gen-frontend
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=mirror.gcr.io/moby/buildkit:buildx-stable-1
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- name: Configure AWS credentials from IAM Role
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_BUILD_ROLE_ARN }}
aws-region: ap-northeast-1
- name: ECR
uses: docker/login-action@v3
with:
registry: ${{ vars.AWS_ECR_REGISTRY }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./bench
push: true
platforms: linux/amd64
tags: |
${{ vars.AWS_ECR_REPOSITORY }}:latest
${{ vars.AWS_ECR_REPOSITORY }}:${{ github.sha }}