1
+ # Based on https://github.com/ml-tooling/universal-build/blob/v0.6.12/workflows/build-pipeline.yml
1
2
name : release-pipeline
2
3
3
4
on :
12
13
env :
13
14
VERSION : ${{ secrets.VERSION }}
14
15
BRANCH_PREFIX : " release/v"
15
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true # TODO: only needed until act supports the new way
16
16
DEFAULT_BRANCH : main
17
17
18
18
jobs :
@@ -22,18 +22,18 @@ jobs:
22
22
- if : ${{ github.event.milestone != null && github.event.milestone.title != null }}
23
23
name : set-milestone-version
24
24
run : |
25
- echo "::set-env name= VERSION:: $(sed "s/^v//" <<< "${{ github.event.milestone.title }}")"
26
- echo "::set-env name= PR_MILESTONE_LINK:: -M ${{ github.event.milestone.title }}"
25
+ echo "VERSION= $(sed "s/^v//" <<< "${{ github.event.milestone.title }}")" >> $GITHUB_ENV
26
+ echo "PR_MILESTONE_LINK= -M ${{ github.event.milestone.title }}" >> $GITHUB_ENV
27
27
- if : ${{ github.event.inputs != null && github.event.inputs.version != null }}
28
28
name : set-input-version
29
- run : echo "::set-env name= VERSION:: ${{ github.event.inputs.version }}"
29
+ run : echo "VERSION= ${{ github.event.inputs.version }}" >> $GITHUB_ENV
30
30
- name : check-version
31
31
run : ' if [[ ! "${{ env.VERSION }}" =~ ^([0-9]+\.[0-9]+\.[0-9]+.*)$ ]]; then echo "The version is not valid: ${{ env.VERSION }}"; exit 1; fi'
32
32
- name : set-github-token
33
- run : echo "::set-env name= GITHUB_TOKEN:: ${{ secrets.GITHUB_TOKEN }}"
33
+ run : echo "GITHUB_TOKEN= ${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
34
34
# Set host ip to env variable to be uside within container actions
35
35
- name : set-host-ip
36
- run : echo "::set-env name= _HOST_IP:: $(hostname -I | cut -d ' ' -f 1)"
36
+ run : echo "_HOST_IP= $(hostname -I | cut -d ' ' -f 1)" >> $GITHUB_ENV
37
37
# Fix git version for act if github token is provided
38
38
- if : ${{ env.GITHUB_ACTOR == 'nektos/act' && env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '' }}
39
39
name : install-latest-git
0 commit comments