-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 1.95 KB
/
build-package.yml
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-package
on:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'CODE_OF_CONDUCT*'
pull_request:
paths-ignore:
- '.github/**'
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'CODE_OF_CONDUCT*'
jobs:
build-package-container-images:
runs-on: ubuntu-latest
environment: Build
steps:
# Checkout repository content
- name: Checkout
uses: actions/checkout@v4
- name: Filter container-images
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
container-images:
- 'container-images/**'
- name: Set up QEMU
if: github.repository_owner == 'microcks' && steps.changes.outputs.container-images == 'true'
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
if: github.repository_owner == 'microcks' && steps.changes.outputs.container-images == 'true'
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io Registry and setup multi-arch builder
if: github.repository_owner == 'microcks' && steps.changes.outputs.container-images == 'true'
run: |
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
BUILDER=buildx-multi-arch
docker buildx inspect $BUILDER || docker buildx create --name=$BUILDER --driver=docker-container --driver-opt=network=host
- name: Build and push container image
if: github.repository_owner == 'microcks' && steps.changes.outputs.container-images == 'true'
run: |
cd container-images/grpcurl
docker buildx build --push \
--platform=linux/amd64,linux/arm64 \
--builder=buildx-multi-arch \
--provenance=false \
--build-arg TAG=v1.8.9-alpine \
--file Dockerfile \
--tag=quay.io/microcks/grpcurl:v1.8.9-alpine .