Skip to content

Commit

Permalink
[CI] Make docker image build when PR is merged into master branch
Browse files Browse the repository at this point in the history
Signed-off-by: hydai <[email protected]>
  • Loading branch information
hydai committed Jun 3, 2021
1 parent 142811b commit 04255c9
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
tags:
- '*.*.*'
branch:
- master
paths:
- 'utils/docker/**'
- '.github/workflows/docker.yml'
Expand Down Expand Up @@ -46,10 +48,6 @@ jobs:
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down Expand Up @@ -184,10 +182,6 @@ jobs:
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down Expand Up @@ -248,10 +242,6 @@ jobs:
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down Expand Up @@ -312,10 +302,6 @@ jobs:
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down

0 comments on commit 04255c9

Please sign in to comment.