-
Notifications
You must be signed in to change notification settings - Fork 53
48 lines (47 loc) · 1.55 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
name: Setup & Build release containers
on:
push:
branches:
- 'release/**'
pull_request:
branches:
- 'release/**'
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: black
uses: psf/black@stable # Black
with:
version: "22.6.0"
options: "--check --extend-exclude tests/escript/scripts/"
- name: Setup env
run: |
python -m pip install --upgrade pip
pip install virtualenv
- name: Build docker image
run: |
make docker
- name: Read VERSION file
id: getversion
run: echo "::set-output name=version::$(cat CalmVersion)"
- name: Execute container
uses: addnab/docker-run-action@v3
with:
image: ntnx/calm-dsl
run: calm
- name: Publish docker image to jfrog-artifactory
if: ${{ github.event_name == 'push' && github.repository == 'nutanix/calm-dsl' && matrix.python-version == '3.7'}}
run: |
docker login ${{ secrets.JFROG_REGISTRY }} -u ${{ secrets.JFROG_USERNAME }} -p ${{ secrets.JFROG_PASSWORD }}
docker tag ntnx/calm-dsl:latest ${{ secrets.JFROG_REGISTRY }}/calm-dsl/calm-dsl:v${{ steps.getversion.outputs.version }}
docker push ${{ secrets.JFROG_REGISTRY }}/calm-dsl/calm-dsl:v${{ steps.getversion.outputs.version }}