Skip to content

chore: update tutorials #13

chore: update tutorials

chore: update tutorials #13

Workflow file for this run

name: 📦️ build api-server
on:
workflow_dispatch:
pull_request:
branches:
- master
paths:
- '.github/workflows/api-server.yaml'
- 'src/api-server/**'
push:
branches:
- master
paths:
- '.github/workflows/api-server.yaml'
- 'src/api-server/**'
tags:
- 'api-server_v[0-9]+.[0-9]+.[0-9]+'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
jobs:
docker-build:
permissions:
contents: read
pull-requests: read
packages: write
runs-on: buildjet-2vcpu-ubuntu-2204
name: "${{ github.event_name == 'pull_request' && 'build ' || 'release' }} image"
steps:
- name: checkout
uses: actions/checkout@v4
- name: docker login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: set up buildx
uses: docker/setup-buildx-action@v3
- name: docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/api-server
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=match,pattern=api-server_(v\d+.\d+.\d+),group=1
type=raw,value={{branch}}-{{sha}}-{{date 'X'}},enable={{is_default_branch}}
type=ref,event=pr
- name: build docker images
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:src/api-server"
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}