PLBA2-3. Правки CI воркфлоу
This commit is contained in:
+26
-5
@@ -13,7 +13,17 @@ jobs:
|
||||
runs-on: cloud-build
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
env:
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
GITEA_REF: ${{ gitea.ref }}
|
||||
run: |
|
||||
set -eu
|
||||
repository_url="${GITEA_SERVER_URL%/}/${GITEA_REPOSITORY}.git"
|
||||
git init .
|
||||
git remote add origin "$repository_url"
|
||||
git fetch --no-tags --depth=1 origin "$GITEA_REF"
|
||||
git checkout --detach FETCH_HEAD
|
||||
|
||||
- name: Check Python version
|
||||
run: |
|
||||
@@ -39,13 +49,24 @@ jobs:
|
||||
runs-on: cloud-build
|
||||
steps:
|
||||
- name: Check out repository and target branch history
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
env:
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
GITEA_REF: ${{ gitea.ref }}
|
||||
BASE_REF: ${{ gitea.base_ref }}
|
||||
run: |
|
||||
set -eu
|
||||
test -n "$BASE_REF"
|
||||
repository_url="${GITEA_SERVER_URL%/}/${GITEA_REPOSITORY}.git"
|
||||
git init .
|
||||
git remote add origin "$repository_url"
|
||||
git fetch --no-tags --depth=1 origin "$GITEA_REF"
|
||||
git checkout --detach FETCH_HEAD
|
||||
git fetch --no-tags --depth=1 origin "refs/heads/${BASE_REF}:refs/remotes/origin/${BASE_REF}"
|
||||
|
||||
- name: Check package version increment
|
||||
env:
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
BASE_REF: ${{ gitea.base_ref }}
|
||||
run: |
|
||||
test -n "$BASE_REF"
|
||||
python3 scripts/check_package_version.py --base-ref "origin/${BASE_REF}"
|
||||
|
||||
Reference in New Issue
Block a user