mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-23 22:01:21 -05:00
CI: Exclude preview releases from "latest" docker release tag
This commit is contained in:
parent
f24c11f0a3
commit
eef78cddb2
21
.github/workflows/build-release-binaries.yml
vendored
21
.github/workflows/build-release-binaries.yml
vendored
@ -145,6 +145,15 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set Docker tags
|
||||||
|
id: docker_tags
|
||||||
|
run: |
|
||||||
|
if [[ ${{ github.event.release.tag_name }} == "preview" ]]; then
|
||||||
|
echo "::set-output name=preview::true"
|
||||||
|
else
|
||||||
|
echo "::set-output name=preview::false"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
@ -152,5 +161,15 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.DOCKER_IMAGE_NAME }}:latest
|
|
||||||
${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }}
|
${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }}
|
||||||
|
${{ env.DOCKER_IMAGE_NAME }}:latest
|
||||||
|
if: steps.docker_tags.outputs.preview == 'false'
|
||||||
|
|
||||||
|
- name: Build and push Docker image without latest tag (preview release)
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }}
|
||||||
|
if: steps.docker_tags.outputs.preview == 'true'
|
||||||
|
Loading…
Reference in New Issue
Block a user