diff --git a/.github/workflows/latest-git-tag.yml b/.github/workflows/latest-git-tag.yml new file mode 100644 index 000000000..9d9339ca8 --- /dev/null +++ b/.github/workflows/latest-git-tag.yml @@ -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 }} diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 3abe9ce47..a168c0bd8 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -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