Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CI latest tag #23

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/build-and-push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ jobs:
- name: Set up the repository
uses: actions/checkout@v3

- name: Release check
id: release
run: |
if [[ ${{ github.ref_name }} =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
echo "release=true" >> $GITHUB_OUTPUT
else
echo "release=false" >> $GITHUB_OUTPUT
fi
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: cytomineuliege/core
tags: |
type=raw,value=latest,enable=${{ steps.release.outputs.release }}
type=semver,pattern={{raw}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -29,7 +47,6 @@ jobs:
CORE_VERSION=${{ github.ref_name }}
context: .
file: ./docker/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: |
cytomineuliege/core:latest
cytomineuliege/core:${{ github.ref_name }}
tags: ${{ steps.meta.outputs.tags }}