-
Notifications
You must be signed in to change notification settings - Fork 359
58 lines (51 loc) · 1.79 KB
/
Copy pathbuild_tool.yaml
File metadata and controls
58 lines (51 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: build_tool
on:
pull_request:
branches:
- master
- 'release-v*'
paths:
- tool/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
env:
REGISTRY: ghcr.io
jobs:
# Build images for each platform in parallel using native runners
build:
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-24.04
arch: amd64
- runner: ubuntu-24.04-arm
arch: arm64
image:
- actions-gh-release
- actions-plan-preview
- codegen
- piped-base
- piped-base-okd
- firestore-emulator
runs-on: ${{ matrix.platform.runner }}
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Determine version
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7 --match 'v[0-9]*.*')" >> $GITHUB_ENV
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Build ${{ matrix.image }} image (${{ matrix.platform.arch }})
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: tool/${{ matrix.image }}
tags: ${{ env.REGISTRY }}/pipe-cd/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
platforms: linux/${{ matrix.platform.arch }}
# parameter to use inline cache. ref; https://docs.docker.com/build/ci/github-actions/cache/#inline-cache
cache-from: type=registry,ref=${{ env.REGISTRY }}/pipe-cd/${{ matrix.image }}:latest
cache-to: type=inline