Skip to content

ci: fixed nightly chaos workflow #236

ci: fixed nightly chaos workflow

ci: fixed nightly chaos workflow #236

name: build-grpc-utils-image
on:
push:
branches: [master]
release:
types: [created]
pull_request:
branches: [master]
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
name: build
runs-on: ubuntu-22.04
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Container meta for the gRPC utils image
id: container_grpc_utils_meta
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # tag=v4
with:
images: |
ghcr.io/${{ github.repository }}-grpc-utils
- name: Set up QEMU
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # tag=v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # tag=v2
- name: Login to GitHub Container Registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # tag=v2
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push gRPC utils image
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # tag=v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.container_grpc_utils_meta.outputs.tags }}
labels: ${{ steps.container_grpc_utils_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
file: grpc-utils.Dockerfile