-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56c5270
commit 7324204
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Setup & build calm-dsl | ||
on: | ||
push: | ||
branches: | ||
- 'test_image/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
strategy: | ||
matrix: | ||
python-version: ['3.7'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: black | ||
uses: psf/black@stable # Exclude list is not honored - https://github.com/psf/black/issues/1584 | ||
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: Install requirements | ||
run: | | ||
make dev | ||
- name: Build python package | ||
run: | | ||
make dist | ||
- name: Build docker image | ||
run: | | ||
make docker | ||
- name: Execute container | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: ntnx/calm-dsl | ||
run: calm | ||
- name: Publish docker image to jfrog-artifactory | ||
- name: Publish docker image | ||
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/ntnx_calm_dsl:unsigned_101 | ||
docker push ${{ secrets.JFROG_REGISTRY }}/calm-dsl/ntnx_calm_dsl:unsigned_101 |