-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (76 loc) · 3.23 KB
/
on-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
name: Release
on:
push:
branches:
- main
permissions:
# read needed for changes detection
# write needed to author a Github release
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
changes:
# Detect which files have been changed on this PR's full history
uses: SwanseaUniversityMedical/workflows/.github/workflows/changes-release.yaml@v4.1.0
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
filters: |
jupyter-container:
- './.github/workflows/on-release.yaml'
- 'containers/**'
- 'plugins/**'
chart:
- './.github/workflows/on-release.yaml'
- 'charts/**'
secrets:
slack-token: ${{ secrets.SLACK_TOKEN }}
######################################################################################################################
# Container Tasks
######################################################################################################################
jupyter-container:
# Build the DARE Jupyter container and push it as :rc-1.0.0
needs: changes
if: fromJSON(needs.changes.outputs.changes).jupyter-container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v4.1.0
with:
job-name: jupyter-container
container-registry: ${{ vars.HARBOR_REGISTRY }}
container-registry-user: ${{ vars.HARBOR_USER }}
container-registry-project: ${{ vars.HARBOR_PROJECT }}
container-registry-repo: ${{ vars.HARBOR_REPO }}
release-tag-format: 'DARE-Jupyter-Container-${version}'
slack-channel: ${{ vars.SLACK_CHANNEL }}
build-command: |
sudo apt update &&
sudo apt install python3.8-venv &&
python -m pip install --user --upgrade build &&
python -m build --outdir ./dist ./containers/custom-packages/jupyter-cloudbeaver-proxy &&
python -m build --outdir ./dist ./containers/custom-packages/jupyter-rsession-proxy &&
docker build -t $IMAGE -f containers/jupyterlab/standard.Dockerfile .
secrets:
container-registry-token: ${{ secrets.HARBOR_TOKEN }}
slack-token: ${{ secrets.SLACK_TOKEN }}
######################################################################################################################
# Chart Tasks
######################################################################################################################
chart:
# Build the chart and push it as x.y.z-rc
needs: changes
if: fromJSON(needs.changes.outputs.changes).chart == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v4.1.0
with:
job-name: chart
chart-registry: ${{ vars.HARBOR_REGISTRY }}
chart-registry-user: ${{ vars.HARBOR_USER }}
chart-registry-project: ${{ vars.HARBOR_PROJECT }}
chart-registry-repo: ${{ vars.HARBOR_REPO }}
release-tag-format: 'DARE-Jupyter-Helm-${version}'
slack-channel: ${{ vars.SLACK_CHANNEL }}
chart: charts/**
test-command: |
helm template $CHART --values charts/jupyter/values.yaml
secrets:
chart-registry-token: ${{ secrets.HARBOR_TOKEN }}
slack-token: ${{ secrets.SLACK_TOKEN }}