add organization flag to single building

This commit is contained in:
Nadezhda Fedorova 2024-09-26 17:04:25 +03:00
parent 19cc3e9200
commit 1e018cfc07

View File

@ -61,7 +61,10 @@ jobs:
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
localimage=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
echo "IMAGE=$localimage" >> ${GITHUB_ENV}
echo "IMAGE=$localimage"
echo "IMAGE=$localimage"
org=$(echo "$localimage" | cut -d '/' -f 1)
echo "ORG=$org" >> ${GITHUB_ENV}
echo "ORG=$org"
- name: Get test for image
run: |
if test -f ${{ gitea.workspace }}/org/$IM/test; then testscript=$(cat ${{ gitea.workspace }}/org/$IM/test); else testscript=""; fi
@ -72,12 +75,13 @@ jobs:
- name: Run building script
id: build-script
run: |
if [[ "$IM" == *"k8s"* ]]; then k8sarg="--tags=tags.toml"; else k8sarg=""; fi
if [[ "$IM" == *"k8s"* ]]; then k8sarg="--tags=tags.toml --overwrite-organization $ORG-$BR"; else k8sarg=""; fi
echo "build.py -i $IM -b $BR"
${{ gitea.workspace }}/build.py -i $IM -b $BR $k8sarg
env:
IM: ${{ env.IMAGE }}
BR: ${{ env.BRANCH }}
ORG: ${{ env.ORG }}
continue-on-error: true
- name: Send notification if build crashed
if: ${{ steps.build-script.outcome != 'success' }}