refactor: migrate to Forgejo workflows, remove GitHub Actions
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
9bca05dea2
commit
b9e73a728d
2 changed files with 64 additions and 68 deletions
|
|
@ -1,63 +1,61 @@
|
||||||
name: Build and deploy Python app to Azure Web App - althaus-preprocessing
|
name: Deploy althaus-preprocessing
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# ---------- BACKEND / PYTHON ----------
|
- name: Set up Python
|
||||||
- name: Set up Python
|
uses: actions/setup-python@v5
|
||||||
uses: actions/setup-python@v5
|
with:
|
||||||
with:
|
python-version: "3.13"
|
||||||
python-version: "3.13"
|
|
||||||
|
- name: Install uv
|
||||||
- name: Install uv
|
uses: astral-sh/setup-uv@v5
|
||||||
uses: astral-sh/setup-uv@v6
|
|
||||||
|
- name: Upload artifact for deployment jobs
|
||||||
# ---------- ARTIFACT ----------
|
uses: actions/upload-artifact@v4
|
||||||
- name: Upload artifact for deployment jobs
|
with:
|
||||||
uses: actions/upload-artifact@v4
|
name: python-app
|
||||||
with:
|
path: |
|
||||||
name: python-app
|
.
|
||||||
path: |
|
!venv/
|
||||||
.
|
!.venv/
|
||||||
!venv/
|
!.git/
|
||||||
!.venv/
|
!.cache/
|
||||||
!.git/
|
|
||||||
!.cache/
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
deploy:
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
permissions:
|
||||||
needs: build
|
id-token: write
|
||||||
permissions:
|
contents: read
|
||||||
id-token: write
|
|
||||||
contents: read
|
steps:
|
||||||
|
- name: Download artifact from build job
|
||||||
steps:
|
uses: actions/download-artifact@v4
|
||||||
- name: Download artifact from build job
|
with:
|
||||||
uses: actions/download-artifact@v4
|
name: python-app
|
||||||
with:
|
|
||||||
name: python-app
|
- name: Login to Azure (OIDC)
|
||||||
|
uses: azure/login@v2
|
||||||
- name: Login to Azure (OIDC)
|
with:
|
||||||
uses: azure/login@v2
|
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_3720212D35D047C38CEE2F365F1D81C7 }}
|
||||||
with:
|
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_AC3FDD6C7376466AA44A309428618439 }}
|
||||||
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_3720212D35D047C38CEE2F365F1D81C7 }}
|
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_94A2088C685A46DFAE2BFBA50714B1DA }}
|
||||||
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_AC3FDD6C7376466AA44A309428618439 }}
|
|
||||||
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_94A2088C685A46DFAE2BFBA50714B1DA }}
|
- name: Deploy to Azure Web App
|
||||||
|
uses: azure/webapps-deploy@v3
|
||||||
- name: Deploy to Azure Web App
|
with:
|
||||||
uses: azure/webapps-deploy@v3
|
app-name: "poweron-althaus-preprocess-prod"
|
||||||
with:
|
slot-name: "Production"
|
||||||
app-name: "poweron-althaus-preprocess-prod"
|
package: .
|
||||||
slot-name: "Production"
|
|
||||||
package: . # reuse the downloaded artifact folder
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build and deploy Python app to Azure Web App - poweron-preprocessing
|
name: Deploy poweron-preprocessing
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -14,16 +14,14 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# ---------- BACKEND / PYTHON ----------
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v5
|
||||||
|
|
||||||
# ---------- ARTIFACT ----------
|
|
||||||
- name: Upload artifact for deployment jobs
|
- name: Upload artifact for deployment jobs
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -60,4 +58,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
app-name: "poweron-preprocessing"
|
app-name: "poweron-preprocessing"
|
||||||
slot-name: "Production"
|
slot-name: "Production"
|
||||||
package: . # reuse the downloaded artifact folder
|
package: .
|
||||||
Loading…
Reference in a new issue