Use google.golang.org/protobuf v1.31.0 #33
Workflow file for this run
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: Docker Image | |
on: | |
push: | |
tags: | |
- '**' | |
branches: | |
- master | |
pull_request: | |
paths: | |
- .github/workflows/jaeger-dockerimage.yml | |
- Dockerfile | |
- protoc-wrapper | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build the Docker image | |
run: docker build . -t build | |
- name: Push the Docker image | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
run: | | |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
function tag_and_push { | |
docker tag build "jaegertracing/protobuf:${1}" && docker push "jaegertracing/protobuf:${1}" | |
} | |
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then | |
tag_and_push "latest" | |
elif [[ "${GITHUB_REF}" =~ refs/tags/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then | |
TAG="${GITHUB_REF#"refs/tags/v"}" | |
tag_and_push "${TAG}" | |
tag_and_push "latest" | |
else | |
tag_and_push "${GITHUB_REF#"refs/tags/"}" | |
fi |