generated from meshery/meshery-istio
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: leecalcote <[email protected]>
- Loading branch information
1 parent
036b69c
commit f771f97
Showing
1 changed file
with
18 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,24 +108,32 @@ jobs: | |
# needs: [build, build_release] | ||
steps: | ||
- name: Check out code | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | ||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Docker build and push | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | ||
uses: docker/build-push-action@v1 | ||
- name: Docker login | ||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() | ||
uses: azure/container-actions/docker-login@master | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: ${{ secrets.IMAGE_NAME }} | ||
tags: latest | ||
tag_with_sha: true | ||
tag_with_ref: true | ||
- name: Docker build & tag | ||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:stable-latest . | ||
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//} | ||
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7} | ||
- name: Docker push | ||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() | ||
run: | | ||
docker push ${{ secrets.IMAGE_NAME }}:stable-latest | ||
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//} | ||
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7} | ||
- name: Docker Hub Description | ||
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | ||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() | ||
uses: peter-evans/[email protected] | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKERHUB_REPOSITORY: ${{ secrets.IMAGE_NAME }} | ||
DOCKERHUB_REPOSITORY: ${{ secrets.IMAGE_NAME }} |