Add CI to push a latest git tag for every stable Meilisearch release

This commit is contained in:
curquiza 2022-12-01 12:48:01 +01:00
parent 6150aa73b0
commit b9a8533de1
2 changed files with 25 additions and 2 deletions

19
.github/workflows/latest-git-tag.yml vendored Normal file
View File

@ -0,0 +1,19 @@
# Create or update a latest git tag when releasing a stable vesrsin of Meilisearch
name: Update latest git tag
on:
workflow_dispatch:
release:
types: [released]
jobs:
update-latest-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rickstaa/action-create-tag@v1
with:
tag: "latest"
message: "Latest stable release of Meilisearch"
# Move the tag if `latest` already exists
force_push_tag: true
github_token: ${{ secrets.MEILI_BOT_GH_PAT }}

View File

@ -3,8 +3,12 @@ on:
schedule:
- cron: '0 4 * * *' # Every day at 4:00am
push:
tags:
- '*'
# Will run for every tag pushed except `latest`
# When the `latest` git tag is created with this [CI](../latest-git-tag.yml)
# we don't need to create a Docker `latest` image again.
# The `latest` Docker image push is already done in this CI when releasing a stable version of Meilisearch.
tags-ignore:
- latest
name: Publish tagged images to Docker Hub