Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

Supervisely-Release:
needs: Update-App-Config
uses: supervisely-ecosystem/workflows/.github/workflows/common.yml@master
uses: supervisely/agent/.github/workflows/workflows-common.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Write Tag to ENV variable
run: echo "BRANCH_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Echo ${{ github.event.release.tag_name }}
run: echo ${{ github.event.release.tag_name }}

Expand Down Expand Up @@ -44,7 +49,7 @@ jobs:
permissions:
contents: write
actions: write
uses: supervisely/agent/.github/workflows/app-release.yml@app-release
uses: supervisely/agent/.github/workflows/app-release.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
permissions:
contents: write
actions: write
uses: supervisely/agent/.github/workflows/app-release.yml@app-release
uses: supervisely/agent/.github/workflows/app-release.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/manual-build-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
tag_version:
description: "Docker Image Tag"
description: "Docker Image Tag (without 'v' prefix)"
required: true
default: ""
release_description:
Expand All @@ -20,6 +20,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Tag Version
run: echo ${{ github.event.inputs.tag_version }}

Expand Down Expand Up @@ -50,7 +55,7 @@ jobs:
permissions:
contents: write
actions: write
uses: supervisely/agent/.github/workflows/app-release.yml@app-release
uses: supervisely/agent/.github/workflows/app-release.yml@master
secrets:
SUPERVISELY_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
SUPERVISELY_PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
Expand All @@ -59,5 +64,5 @@ jobs:
with:
SUPERVISELY_SERVER_ADDRESS: "${{ vars.SUPERVISELY_DEV_SERVER_ADDRESS }}"
SUPERVISELY_PROD_SERVER_ADDRESS: "${{ vars.SUPERVISELY_PROD_SERVER_ADDRESS }}"
RELEASE_VERSION: "${{ inputs.tag_version }}"
RELEASE_VERSION: "v${{ inputs.tag_version }}"
RELEASE_DESCRIPTION: "${{ inputs.release_description }}"
122 changes: 122 additions & 0 deletions .github/workflows/workflows-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Supervisely release
run-name: Supervisely ${{ github.repository }} app release
on:
workflow_call:
inputs:
SUPERVISELY_SERVER_ADDRESS:
required: true
type: string
SUPERVISELY_PROD_SERVER_ADDRESS:
required: true
type: string
SLUG:
required: true
type: string
RELEASE_VERSION:
required: true
type: string
RELEASE_DESCRIPTION:
required: true
type: string
SUBAPP_PATHS:
required: true
type: string
RELEASE_TYPE:
required: true
type: string
SKIP_INSTANCE_VERSION_VALIDATION:
required: false
type: boolean
default: false
SKIP_IMAGE_VALIDATION:
required: false
type: boolean
default: false
ARCHIVE_ONLY_CONFIG:
required: false
type: boolean
default: false
COMMIT_SHA:
required: false
type: string
default: ""
MODELS_PATH:
required: false
type: string
default: ""
FRAMEWORK:
required: false
type: string
default: ""
RELEASE_MODELS:
required: false
type: boolean
default: false
secrets:
SUPERVISELY_DEV_API_TOKEN:
required: true
SUPERVISELY_PRIVATE_DEV_API_TOKEN:
required: true
SUPERVISELY_PROD_API_TOKEN:
required: true
GH_ACCESS_TOKEN:
required: true

jobs:
Supervisely-Release:
runs-on: gha-runner-supervisely
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.COMMIT_SHA }}
fetch-depth: 0

- uses: actions/checkout@v6
with:
repository: supervisely-ecosystem/workflows
path: workflow

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1 libmagic1 skopeo
python -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install -r ./workflow/requirements.txt

- name: Supervisely Release
run: |
. venv/bin/activate
python ./workflow/release.py
env:
DEV_SERVER_ADDRESS: "${{ inputs.SUPERVISELY_SERVER_ADDRESS }}"
PROD_SERVER_ADDRESS: "${{ inputs.SUPERVISELY_PROD_SERVER_ADDRESS }}"
DEV_API_TOKEN: "${{ secrets.SUPERVISELY_DEV_API_TOKEN }}"
PRIVATE_DEV_API_TOKEN: "${{ secrets.SUPERVISELY_PRIVATE_DEV_API_TOKEN }}"
PROD_API_TOKEN: "${{ secrets.SUPERVISELY_PROD_API_TOKEN }}"
GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}"
SLUG: "${{ inputs.SLUG }}"
RELEASE_VERSION: "${{ inputs.RELEASE_VERSION }}"
RELEASE_DESCRIPTION: "${{ inputs.RELEASE_DESCRIPTION }}"
RELEASE_TYPE: "${{ inputs.RELEASE_TYPE }}"
SUBAPP_PATHS: "${{ inputs.SUBAPP_PATHS }}"
SKIP_INSTANCE_VERSION_VALIDATION: "${{ inputs.SKIP_INSTANCE_VERSION_VALIDATION }}"
SKIP_IMAGE_VALIDATION: "${{ inputs.SKIP_IMAGE_VALIDATION }}"
ARCHIVE_ONLY_CONFIG: "${{ inputs.ARCHIVE_ONLY_CONFIG }}"

Models-release:
needs: Supervisely-Release
if: inputs.RELEASE_MODELS && inputs.RELEASE_TYPE != 'release-branch'
uses: supervisely/agent/.github/workflows/workflows-sync-models-common.yml@master
secrets:
API_TOKEN: "${{ secrets.SUPERVISELY_PROD_API_TOKEN }}"
with:
SERVER_ADDRESS: "${{ vars.SUPERVISELY_PROD_SERVER_ADDRESS }}"
MODELS_PATH: "${{ inputs.MODELS_PATH }}"
FRAMEWORK: "${{ inputs.FRAMEWORK }}"
53 changes: 53 additions & 0 deletions .github/workflows/workflows-sync-models-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Sync Models
on:
workflow_call:
inputs:
MODELS_PATH:
type: string
required: false
DET_MODELS_PATH:
type: string
required: false
FRAMEWORK:
type: string
required: true
SERVER_ADDRESS:
type: string
required: true
secrets:
API_TOKEN:
required: true

jobs:
release-models:
runs-on: gha-runner-supervisely
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
repository: supervisely-ecosystem/workflows
path: workflow

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: |
sudo apt-get update
python -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install -r workflow/requirements.txt

- name: Sync models
run: |
. venv/bin/activate
python workflow/release_models.py
env:
SERVER_ADDRESS: ${{ inputs.SERVER_ADDRESS }}
API_TOKEN: ${{ secrets.API_TOKEN }}
MODELS_PATH: ${{ inputs.MODELS_PATH }}
DET_MODELS_PATH: ${{ inputs.DET_MODELS_PATH }}
FRAMEWORK: ${{ inputs.FRAMEWORK }}