diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml deleted file mode 100644 index 88e3e14..0000000 --- a/.github/workflows/dockerimage.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Docker Image -on: - push: - tags: - - '**' - branches: - - master - pull_request: - paths: - - .github/workflows/dockerimage.yml - - Dockerfile - - protoc-wrapper - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Build the Docker image - run: docker 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}" - if [[ "${TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - tag_and_push "${TAG%.*}" - tag_and_push "${TAG%.*.*}"; - tag_and_push "latest" - fi - else - tag_and_push "${GITHUB_REF#"refs/tags/"}" - fi diff --git a/.github/workflows/jaeger-dockerimage.yml b/.github/workflows/jaeger-dockerimage.yml index 0c59c35..4574447 100644 --- a/.github/workflows/jaeger-dockerimage.yml +++ b/.github/workflows/jaeger-dockerimage.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Build the Docker image - run: docker build . + run: docker build . -t build - name: Push the Docker image if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') run: |