-
Notifications
You must be signed in to change notification settings - Fork 21
95 lines (86 loc) · 2.74 KB
/
release.yaml
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
name: release
on:
# # UNCOMMENT TO ALLOW TESTING:
# pull_request:
push:
tags:
- "v*.*.*"
defaults:
run:
shell: bash -euo pipefail {0}
jobs:
get-tag:
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
dry-run: ${{ steps.get-tag.outputs.dry-run }}
runs-on: ubuntu-latest
steps:
- name: get tag
id: get-tag
env:
REF_NAME: ${{ github.ref_name }}
SHA: ${{ github.event.pull_request.head.sha || '' }}
run: |
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
echo "dry-run=true" | tee -a $GITHUB_OUTPUT
sha="${SHA::7}"
day="$(date -u '+%+4Y%m%d')" # equivalent to %F (e.g. '2024-01-19') with no dashes (e.g. '20240119')
echo "tag=testrelease-$day.$sha.$GITHUB_RUN_ID" | tee -a $GITHUB_OUTPUT
else
echo "dry-run=false" | tee -a $GITHUB_OUTPUT
echo "tag=$REF_NAME" | tee -a $GITHUB_OUTPUT
fi
build-images:
uses: ./.github/workflows/build-images.yaml
needs: get-tag
with:
tag: ${{ needs.get-tag.outputs.tag }}
build-cluster-autoscaler: true
upload-to-ecr: true
secrets: inherit
build-test-vm:
uses: ./.github/workflows/build-test-vm.yaml
needs: get-tag
with:
tag: ${{ needs.get-tag.outputs.tag }}
upload-vm-builder: true
secrets: inherit
e2e:
needs: [ get-tag, build-images, build-test-vm ]
uses: ./.github/workflows/e2e-test.yaml
with:
tag: ${{ needs.get-tag.outputs.tag }}
push-yamls: true
secrets: inherit
release:
needs: [ get-tag, e2e ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: download vm-builder
uses: actions/download-artifact@v4
with:
name: vm-builder
path: .
- name: download manifests
uses: actions/download-artifact@v4
with:
name: rendered_manifests
# files in the artifact will be expanded into the directory 'rendered_manifests'.
# See e2e-test.yaml: the individual yamls are flattened inside the artifact.
path: rendered_manifests
- name: github release
if: ${{ needs.get-tag.outputs.dry-run == 'false' }}
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
vm-builder
rendered_manifests/autoscale-scheduler.yaml
rendered_manifests/autoscaler-agent.yaml
rendered_manifests/neonvm.yaml
rendered_manifests/neonvm-runner-image-loader.yaml
rendered_manifests/multus.yaml
rendered_manifests/multus-eks.yaml
rendered_manifests/whereabouts.yaml
deploy/vmscrape.yaml