Adding a new grpcurl utility container image #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-package | |
on: | |
push: | |
paths-ignore: | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
jobs: | |
build-package-container-images: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
# Checkout repository content | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Filter container-images | |
uses: dorny/paths-filter@v2 | |
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 . |