Deploy to -staging when draft=true
This commit is contained in:
parent
c7574b0e5f
commit
452a5914a2
3 changed files with 5 additions and 4 deletions
|
@ -14,6 +14,10 @@ for apk in $apkgs; do
|
|||
arch=$(echo $apk | awk -F '/' '{print $3}')
|
||||
name=$(echo $apk | awk -F '/' '{print $4}')
|
||||
|
||||
if [ "$(curl -s $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/pulls/$GITHUB_EVENT_NUMBER | jq .draft)" == "true" ]; then
|
||||
branch="$branch-testing"
|
||||
fi
|
||||
|
||||
echo "Sending $name of arch $arch to $TARGET_REPO/$BASEBRANCH/$branch"
|
||||
return=$(curl -s --user $FORGE_REPO_USER:$FORGE_REPO_TOKEN --upload-file $apk $TARGET_REPO/$BASEBRANCH/$branch 2>&1)
|
||||
echo $return
|
||||
|
|
|
@ -39,7 +39,6 @@ jobs:
|
|||
deploy-aarch64:
|
||||
needs: [build-aarch64]
|
||||
runs-on: aarch64
|
||||
if: github.event.pull_request.draft == false
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
|
@ -53,7 +53,5 @@ jobs:
|
|||
- name: Package download
|
||||
uses: forgejo/download-artifact@v3
|
||||
- name: Package deployment
|
||||
run: |
|
||||
echo $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/pulls/${{ github.event.number }}
|
||||
curl -s $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/pulls/${{ github.event.number }} | jq .draft
|
||||
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh
|
||||
|
||||
|
|
Loading…
Reference in a new issue