mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-09 06:33:16 +00:00
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.8.0...v2.9.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
65 lines
1.9 KiB
YAML
65 lines
1.9 KiB
YAML
# This workflow (re)builds and pushes a Docker image containing the
|
|
# protobuf build tools used by the other workflows.
|
|
#
|
|
# When making changes that require updates to the builder image, you
|
|
# should merge the updates first and wait for this workflow to complete,
|
|
# so that the changes will be available for the dependent workflows.
|
|
#
|
|
|
|
name: Build & Push Proto Builder Image
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "proto/*"
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "proto/*"
|
|
schedule:
|
|
# run this job once a month to recieve any go or buf updates
|
|
- cron: "0 9 1 * *"
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: tendermint/docker-build-proto
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- name: Check out and assign tags
|
|
id: prep
|
|
run: |
|
|
DOCKER_IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
|
VERSION=noop
|
|
if [[ "$GITHUB_REF" == "refs/tags/*" ]]; then
|
|
VERSION="${GITHUB_REF#refs/tags/}"
|
|
elif [[ "$GITHUB_REF" == "refs/heads/*" ]]; then
|
|
VERSION="$(echo "${GITHUB_REF#refs/heads/}" | sed -r 's#/+#-#g')"
|
|
if [[ "${{ github.event.repository.default_branch }}" = "$VERSION" ]]; then
|
|
VERSION=latest
|
|
fi
|
|
fi
|
|
TAGS="${DOCKER_IMAGE}:${VERSION}"
|
|
echo ::set-output name=tags::"${TAGS}"
|
|
|
|
- name: Set up docker buildx
|
|
uses: docker/setup-buildx-action@v1.6.0
|
|
|
|
- name: Log in to the container registry
|
|
uses: docker/login-action@v1.12.0
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and publish image
|
|
uses: docker/build-push-action@v2.9.0
|
|
with:
|
|
context: ./proto
|
|
file: ./proto/Dockerfile
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.prep.outputs.tags }}
|