forked from alisw/AliPhysics
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 2.21 KB
/
release.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
name: Prepare AliPhysics tag and start build
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to prepare'
required: true
default: 'v5-09-XXy-01'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
run: |
cat << EOF
::set-output name=branch::$(echo ${{ github.event.inputs.tag }}-patches | sed -e's/[a-z][a-z]*-01-patches$/-01-patches/')
::set-output name=aliroot_tag::$(echo ${{ github.event.inputs.tag }} | sed -e's/-01$//')
EOF
id: decide_release_branch
- uses: actions/checkout@v2
with:
ref: "master"
- name: Tag branch (or create one before tagging if does not exists)
run: |
set -x
git fetch origin
git checkout -B ${{ steps.decide_release_branch.outputs.branch }} origin/${{ steps.decide_release_branch.outputs.branch }}
git config --global user.email "[email protected]"
git config --global user.name "ALICE Action Bot"
git push --set-upstream origin ${{ steps.decide_release_branch.outputs.branch }}
git tag ${{ github.event.inputs.tag }}
git push --set-upstream origin ${{ github.event.inputs.tag }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.event.inputs.tag }}
release_name: ${{ github.event.inputs.tag }}
draft: false
prerelease: false
- name: Install Kerberos
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y krb5-user
cat << \EOF > krb5.conf
${{secrets.KRB5CONF}}
EOF
grep rdns krb5.conf
sudo mv -f krb5.conf /etc/krb5.conf
- name: Trigger release in jenkins
run: |
set -x
echo ${{secrets.JENKINS_BOT_PASS}} | kinit ${{secrets.PRINCIPAL}}
curl -X POST -k --negotiate -u : ${{secrets.API_URL}} -H 'Content-Type: application/x-www-form-urlencoded' \
-d 'ALIDIST_SLUG=alisw/alidist@AliPhysics-${{github.event.inputs.tag}}'
klist
kdestroy