forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.89 KB
/
downgrade_versions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: downgrade_versions
on:
push:
tags:
- '**'
concurrency:
# Update of a developer branch cancels the previously scheduled workflow
# run for this branch. However, the 'master' branch, release branch, and
# tag workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow run ID' +
# 'workflow run attempt' because it is a unique combination for any run.
# So it effectively discards grouping.
#
# Important: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push event.
group: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true
jobs:
downgrade_versions:
if: github.repository == 'tarantool/tarantool'
runs-on: ubuntu-20.04-self-hosted
container:
image: docker.io/tarantool/testing:ubuntu-jammy
steps:
- name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master
- name: Sources checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# If workflow is triggered by pushing a tag and we checkout
# using github.ref then checkout action overwrite tag with tag
# without annotation. This breaks check-downgrade-versions.sh
# script as it is triggered only on annotated tags. Let's
# checkout by sha in this case.
ref: ${{ github.sha }}
- name: Check downgrade versions
run: ./tools/check-downgrade-versions.sh
- name: Send VK Teams message on failure
if: failure()
uses: ./.github/actions/report-job-status
with:
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}