Deploy to -staging when draft=true
Some checks failed
/ lint (pull_request) Failing after 28s
/ build-x86_64 (pull_request) Successful in 2m11s
/ deploy-x86_64 (pull_request) Successful in 26s
/ build-aarch64 (pull_request) Successful in 8m23s
/ deploy-aarch64 (pull_request) Successful in 56s

This commit is contained in:
Antoine Martin 2024-08-23 00:02:34 -04:00
parent c7574b0e5f
commit 452a5914a2
Signed by: forge
GPG key ID: D62A472A4AA7D541
3 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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:

View file

@ -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