forked from microsoft/AzureTRE
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.54 KB
/
cli-package.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
---
name: cli-package
on:
push:
branches: ["main"]
workflow_dispatch:
inputs:
environment:
description: The environment to run this workflow in
type: environment
default: CICD
required: true
jobs:
build:
runs-on: ubuntu-latest
# environment is used to access the secrets for Azure credentials
# to sign in to a container registry to re-use a dev container image as a build cache
environment: ${{ inputs.environment || 'CICD'}}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v2
- name: Build and run dev container task
uses: ./.github/actions/devcontainer_run_command
with:
COMMAND: |
# Validate installation and showing help output
cd cli
make pip-install install-cli
source <(_TRE_COMPLETE=bash_source tre)
tre --help
DEVCONTAINER_TAG: latest
CI_CACHE_ACR_NAME: ${{ secrets.ACR_NAME}}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create the CLI package
uses: ./.github/actions/devcontainer_run_command
with:
COMMAND: |
# Create the python wheel
cd cli
sudo make build-package
DEVCONTAINER_TAG: latest
CI_CACHE_ACR_NAME: ${{ secrets.ACR_NAME}}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
- name: Upload Wheel as artifact
uses: actions/upload-artifact@v3
with:
name: tre-cli
path: dist/tre-*.whl