-
Notifications
You must be signed in to change notification settings - Fork 21
98 lines (79 loc) · 2.32 KB
/
create-dev-tag.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Create Development Tag
on:
workflow_dispatch:
schedule:
- cron: '5 3 * * *'
env:
GOWORK: off
GOPRIVATE: github.com/mesosphere
permissions:
contents: write
actions: write
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on:
- self-hosted
- small
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install NIX
uses: cachix/install-nix-action@v30
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true
skip-nix-installation: true
- name: Generate tag
id: set-matrix
run: |
export GITHUB_REPOSITORY="kommander-applications"
OUT=$(devbox run -- make repo.supported-branches | tail -n 1)
echo "matrix=$OUT" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
create-dev-tag:
needs: generate-matrix
runs-on:
- self-hosted
- small
strategy:
fail-fast: false
matrix:
branch: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
depth: 0
- name: Install NIX
uses: cachix/install-nix-action@v30
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true
skip-nix-installation: true
- name: Generate tag
run: |
# Overriding a variable that causes a conflict in legacy
# versions of gh-dkp
export GITHUB_REPOSITORY="kommander-applications"
OUT=$(devbox run -- make repo.dev.tag)
echo "TAG=$(echo ${OUT##* })" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
- name: Create tag
run: |
git config --global user.email "[email protected]"
git config --global user.name "ci-mergebot"
git tag -m "${{ env.TAG }}" ${{ env.TAG }}
- name: Push tag
run: git push --force --tags origin ${{ env.TAG }}
- name: Run release workflow
uses: benc-uk/[email protected]
with:
workflow: release.yml
ref: ${{ env.TAG }}