also filter out tags with "dev" in them
This commit is contained in:
parent
c2175a4099
commit
9a3c36eef1
1 changed files with 4 additions and 4 deletions
|
@ -32,14 +32,14 @@ jobs:
|
||||||
TAGS=$(curl --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}" "https://gitlab.com/api/v4/projects/liberaforms%2Fliberaforms/repository/tags" | jq -r '.[].name')
|
TAGS=$(curl --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}" "https://gitlab.com/api/v4/projects/liberaforms%2Fliberaforms/repository/tags" | jq -r '.[].name')
|
||||||
echo "::set-output name=tags::$TAGS"
|
echo "::set-output name=tags::$TAGS"
|
||||||
|
|
||||||
- name: Filter out RC tags and get the latest version
|
- name: Filter out RC and dev tags and get the latest version
|
||||||
id: filter_tags
|
id: filter_tags
|
||||||
run: |
|
run: |
|
||||||
TAGS="${{ steps.get_tags.outputs.tags }}"
|
TAGS="${{ steps.get_tags.outputs.tags }}"
|
||||||
FILTERED_TAGS=$(echo "$TAGS" | grep -Ev 'RC[0-9]$' | sort -V | tail -n 1)
|
FILTERED_TAGS=$(echo "$TAGS" | grep -Ev 'RC[0-9]$|dev' | sort -V | tail -n 1)
|
||||||
echo "Latest tag excluding RC: $FILTERED_TAGS"
|
echo "Latest tag excluding RC and dev: $FILTERED_TAGS"
|
||||||
echo "::set-output name=latest_tag::$FILTERED_TAGS"
|
echo "::set-output name=latest_tag::$FILTERED_TAGS"
|
||||||
|
|
||||||
- name: Build and Push with Latest Tag
|
- name: Build and Push with Latest Tag
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Add table
Reference in a new issue